diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c525180a7..17306fdd1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] @@ -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 diff --git a/src/jinja2/compiler.py b/src/jinja2/compiler.py index 7dfac0a71..ff95c807b 100644 --- a/src/jinja2/compiler.py +++ b/src/jinja2/compiler.py @@ -1406,7 +1406,7 @@ 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: @@ -1414,7 +1414,7 @@ def finalize(value: t.Any) -> t.Any: 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) diff --git a/src/jinja2/parser.py b/src/jinja2/parser.py index 12703a97a..3354bc933 100644 --- a/src/jinja2/parser.py +++ b/src/jinja2/parser.py @@ -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")