Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #739

Merged
merged 5 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading