Skip to content

Commit 87d012a

Browse files
committed
Update pre-commit hooks, disable a deprecated rule
1 parent f6f88ae commit 87d012a

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ repos:
1414
- id: mixed-line-ending
1515
- id: trailing-whitespace
1616
- repo: https://github.com/adamchainz/django-upgrade
17-
rev: 1.22.2
17+
rev: 1.23.1
1818
hooks:
1919
- id: django-upgrade
2020
args: [--target-version, "3.2"]
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: "v0.9.3"
22+
rev: "v0.10.0"
2323
hooks:
2424
- id: ruff
2525
args: [--unsafe-fixes]
2626
- id: ruff-format
2727
- repo: https://github.com/biomejs/pre-commit
28-
rev: "v0.6.1"
28+
rev: "v1.9.4"
2929
hooks:
3030
- id: biome-check
3131
additional_dependencies: ["@biomejs/[email protected]"]
3232
args: [--unsafe]
3333
- repo: https://github.com/tox-dev/pyproject-fmt
34-
rev: v2.5.0
34+
rev: v2.5.1
3535
hooks:
3636
- id: pyproject-fmt
3737
- repo: https://github.com/abravalheri/validate-pyproject
38-
rev: v0.23
38+
rev: v0.24
3939
hooks:
4040
- id: validate-pyproject

feincms3/applications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def reverse_app(namespaces, viewname, *args, languages=None, **kwargs):
123123
f"{_APPS_MODEL.LANGUAGE_CODES_NAMESPACE}-{language}"
124124
for language in languages
125125
),
126-
(namespaces if isinstance(namespaces, list | tuple) else (namespaces,)),
126+
(namespaces if isinstance(namespaces, (list, tuple)) else (namespaces,)),
127127
(viewname,),
128128
)
129129
]

feincms3/renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def render_in_context(context, template, local_context=None):
5656
except AttributeError:
5757
engine = Engine.get_default()
5858

59-
if isinstance(template, list | tuple):
59+
if isinstance(template, (list, tuple)):
6060
template = engine.select_template(template)
6161
else:
6262
template = engine.get_template(template)

feincms3/templatetags/feincms3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def render(self, context):
4747
namespaces = self.namespaces.resolve(context)
4848
view_name = self.view_name.resolve(context)
4949
fallback = kwargs.pop("fallback", None)
50-
if not isinstance(namespaces, list | tuple):
50+
if not isinstance(namespaces, (list, tuple)):
5151
namespaces = namespaces.split(",")
5252
# Try to look up the URL. If it fails, raise NoReverseMatch unless the
5353
# {% reverse ... as var %} construct is used, in which case return

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ lint.extend-ignore = [
117117
"E501",
118118
# Do not warn about percent formatting for now
119119
"UP031",
120+
# The a | b type rule has been deprecated
121+
"UP038",
120122
]
121123
lint.per-file-ignores."*/migrat*/*" = [
122124
# Allow using PascalCase model names in migrations

0 commit comments

Comments
 (0)