Skip to content

Commit

Permalink
Update Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 3, 2024
1 parent da9e29b commit cf3c1d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.8.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions src/argon2/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def main(argv: list[str]) -> None:
)
hash = ph.hash(password)

print("Running Argon2id %d times with:" % (args.n,))
print(f"Running Argon2id {args.n} times with:")

for name, value, units in [
("hash_len", ph.hash_len, "bytes"),
("memory_cost", ph.memory_cost, "KiB"),
("parallelism", ph.parallelism, "threads"),
("time_cost", ph.time_cost, "iterations"),
]:
print("%s: %d %s" % (name, value, units))
print(f"{name}: {value} {units}")

print("\nMeasuring...")
duration = timeit.timeit(
Expand Down
8 changes: 4 additions & 4 deletions src/argon2/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ class Parameters:
parallelism: int

__slots__ = (
"type",
"version",
"salt_len",
"hash_len",
"time_cost",
"memory_cost",
"parallelism",
"salt_len",
"time_cost",
"type",
"version",
)


Expand Down

0 comments on commit cf3c1d6

Please sign in to comment.