update Ruff
This commit is contained in:
parent
16476222ca
commit
71a5f0f84c
@ -4,7 +4,7 @@ ci:
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.11.12
|
||||
rev: v0.12.2
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
|
||||
@ -182,6 +182,7 @@ ignore = [
|
||||
"FIX", # Yes, we want XXX as a marker.
|
||||
"INP001", # sometimes we want Python files outside of packages
|
||||
"ISC001", # conflicts with ruff format
|
||||
"PLC0415", # sometimes, imports must live elsewhere
|
||||
"PLR0913", # yes, many arguments, but most have defaults
|
||||
"PLR2004", # numbers are sometimes fine
|
||||
"PLW2901", # re-assigning within loop bodies is fine
|
||||
|
||||
@ -63,13 +63,13 @@ class TestPasswordHasher:
|
||||
assert isinstance(h, str)
|
||||
assert h[: len(prefix)] == prefix
|
||||
|
||||
def test_custom_salt(self, password=b"password"):
|
||||
def test_custom_salt(self):
|
||||
"""
|
||||
A custom salt can be specified.
|
||||
"""
|
||||
ph = PasswordHasher.from_parameters(profiles.CHEAPEST)
|
||||
|
||||
h = ph.hash(password, salt=b"1234567890123456")
|
||||
h = ph.hash(b"password", salt=b"1234567890123456")
|
||||
|
||||
assert h == (
|
||||
"$argon2id$v=19$m=8,t=1,p=1$MTIzNDU2Nzg5MDEyMzQ1Ng$maTa5w"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user