Skip to content

Commit

Permalink
Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WisdomPill committed Jun 14, 2024
1 parent 00207b0 commit da4b680
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://beta.ruff.rs/docs/rules/
select = [
lint.select = [
# rules from pyflakes
"F",

Expand Down Expand Up @@ -112,7 +112,7 @@ select = [
"RUF100",
]

ignore = [
lint.ignore = [
"COM812", # missing trailing comma, covered by black
"ANN101", # ignore missing type annotation in self parameter
"S311", # ignore Standard pseudo-random generators because they are not used for cryptographic purposes
Expand All @@ -122,11 +122,11 @@ fix = true

target-version = "py38"

[flake8-tidy-imports]
[lint.flake8-tidy-imports]
## Disallow all relative imports.
ban-relative-imports = "all"

[per-file-ignores]
[lint.per-file-ignores]
# ignore assert statements in tests
"tests/*.py" = ["S101"]

Expand Down
3 changes: 2 additions & 1 deletion django_redis/client/sharded.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ def incr_version(self, key, delta=1, version=None, client=None):
raise ConnectionInterrupted(connection=client) from e

if value is None:
raise ValueError("Key '%s' not found" % key)
msg = f"Key '{key}' not found"
raise ValueError(msg)

if isinstance(key, CacheKey):
new_key = self.make_key(key.original_key(), version=version + delta)
Expand Down

0 comments on commit da4b680

Please sign in to comment.