Skip to content

Commit da4b680

Browse files
committed
Ruff fixes
1 parent 00207b0 commit da4b680

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.ruff.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# https://beta.ruff.rs/docs/rules/
2-
select = [
2+
lint.select = [
33
# rules from pyflakes
44
"F",
55

@@ -112,7 +112,7 @@ select = [
112112
"RUF100",
113113
]
114114

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

123123
target-version = "py38"
124124

125-
[flake8-tidy-imports]
125+
[lint.flake8-tidy-imports]
126126
## Disallow all relative imports.
127127
ban-relative-imports = "all"
128128

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

django_redis/client/sharded.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def incr_version(self, key, delta=1, version=None, client=None):
258258
raise ConnectionInterrupted(connection=client) from e
259259

260260
if value is None:
261-
raise ValueError("Key '%s' not found" % key)
261+
msg = f"Key '{key}' not found"
262+
raise ValueError(msg)
262263

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

0 commit comments

Comments
 (0)