Skip to content

Commit

Permalink
update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Jan 10, 2024
1 parent 5c8a105 commit 7277d80
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.10.0
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: ["--application-directories", "src"]
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.12.1
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear]
Expand All @@ -26,7 +26,7 @@ repos:
hooks:
- id: pip-compile-multi-verify
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
Expand Down
4 changes: 2 additions & 2 deletions src/jinja2/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,15 +1406,15 @@ def _make_finalize(self) -> _FinalizeInfo:

if pass_arg is None:

def finalize(value: t.Any) -> t.Any:
def finalize(value: t.Any) -> t.Any: # noqa: F811
return default(env_finalize(value))

else:
src = f"{src}{pass_arg}, "

if pass_arg == "environment":

def finalize(value: t.Any) -> t.Any:
def finalize(value: t.Any) -> t.Any: # noqa: F811
return default(env_finalize(self.environment, value))

self._finalize = self._FinalizeInfo(finalize, src)
Expand Down
2 changes: 1 addition & 1 deletion src/jinja2/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ def parse_subscribed(self) -> nodes.Expr:
else:
args.append(None)

return nodes.Slice(lineno=lineno, *args)
return nodes.Slice(lineno=lineno, *args) # noqa: B026

def parse_call_args(self) -> t.Tuple:
token = self.stream.expect("lparen")
Expand Down

0 comments on commit 7277d80

Please sign in to comment.