diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1955da9..721ff57 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/pyproject.toml b/pyproject.toml index f569729..5d0cff5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/tests/test_password_hasher.py b/tests/test_password_hasher.py index 90adc1a..c5805f6 100644 --- a/tests/test_password_hasher.py +++ b/tests/test_password_hasher.py @@ -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"