Skip to content

Commit ce47b30

Browse files
authored
Merge pull request #739 from jazzband/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents ad9cc78 + da4b680 commit ce47b30

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-ast
66
- id: check-case-conflict
@@ -12,12 +12,12 @@ repos:
1212
# from readme - ruff with autofix must run before
1313
# other formatters, such as black
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.2.2
15+
rev: v0.4.8
1616
hooks:
1717
- id: ruff
1818
args: [ --fix, --exit-non-zero-on-fix , --show-fixes]
1919

2020
- repo: https://github.com/psf/black
21-
rev: 24.2.0
21+
rev: 24.4.2
2222
hooks:
2323
- id: black

.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)

django_redis/compressors/lz4.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ def compress(self, value: bytes) -> bytes:
1616
def decompress(self, value: bytes) -> bytes:
1717
try:
1818
return _decompress(value)
19-
except Exception as e: # noqa: BLE001
19+
except Exception as e:
2020
raise CompressorError from e

0 commit comments

Comments
 (0)