Skip to content

Commit

Permalink
Merge pull request #739 from jazzband/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
WisdomPill authored Jun 14, 2024
2 parents ad9cc78 + da4b680 commit ce47b30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand All @@ -12,12 +12,12 @@ repos:
# from readme - ruff with autofix must run before
# other formatters, such as black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
rev: v0.4.8
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix , --show-fixes]

- repo: https://github.com/psf/black
rev: 24.2.0
rev: 24.4.2
hooks:
- id: black
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
2 changes: 1 addition & 1 deletion django_redis/compressors/lz4.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ def compress(self, value: bytes) -> bytes:
def decompress(self, value: bytes) -> bytes:
try:
return _decompress(value)
except Exception as e: # noqa: BLE001
except Exception as e:
raise CompressorError from e

0 comments on commit ce47b30

Please sign in to comment.