Skip to content

Commit 9c6c319

Browse files
authored
[pre-commit.ci] pre-commit autoupdate (#1993)
2 parents afb577b + 4b6dac1 commit 9c6c319

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ci:
22
autoupdate_schedule: monthly
33
repos:
44
- repo: https://github.com/astral-sh/ruff-pre-commit
5-
rev: v0.4.4
5+
rev: v0.4.7
66
hooks:
77
- id: ruff
88
- id: ruff-format

src/jinja2/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def get_template_locals(real_locals: t.Mapping[str, t.Any]) -> t.Dict[str, t.Any
133133
available at that point in the template.
134134
"""
135135
# Start with the current template context.
136-
ctx: "t.Optional[Context]" = real_locals.get("context")
136+
ctx: t.Optional[Context] = real_locals.get("context")
137137

138138
if ctx is not None:
139139
data: t.Dict[str, t.Any] = ctx.get_all().copy()

src/jinja2/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def _from_namespace(
12501250
namespace: t.MutableMapping[str, t.Any],
12511251
globals: t.MutableMapping[str, t.Any],
12521252
) -> "Template":
1253-
t: "Template" = object.__new__(cls)
1253+
t: Template = object.__new__(cls)
12541254
t.environment = environment
12551255
t.globals = globals
12561256
t.name = namespace["name"]

src/jinja2/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def do_batch(
11161116
{%- endfor %}
11171117
</table>
11181118
"""
1119-
tmp: "t.List[V]" = []
1119+
tmp: t.List[V] = []
11201120

11211121
for item in value:
11221122
if len(tmp) == linecount:

src/jinja2/idtracking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def branch_update(self, branch_symbols: t.Sequence["Symbols"]) -> None:
146146

147147
def dump_stores(self) -> t.Dict[str, str]:
148148
rv: t.Dict[str, str] = {}
149-
node: t.Optional["Symbols"] = self
149+
node: t.Optional[Symbols] = self
150150

151151
while node is not None:
152152
for name in sorted(node.stores):
@@ -159,7 +159,7 @@ def dump_stores(self) -> t.Dict[str, str]:
159159

160160
def dump_param_targets(self) -> t.Set[str]:
161161
rv = set()
162-
node: t.Optional["Symbols"] = self
162+
node: t.Optional[Symbols] = self
163163

164164
while node is not None:
165165
for target, (instr, _) in self.loads.items():

src/jinja2/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def __init__(
329329
filename: t.Optional[str],
330330
):
331331
self._iter = iter(generator)
332-
self._pushed: "te.Deque[Token]" = deque()
332+
self._pushed: te.Deque[Token] = deque()
333333
self.name = name
334334
self.filename = filename
335335
self.closed = False

src/jinja2/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
self.filename = filename
6565
self.closed = False
6666
self.extensions: t.Dict[
67-
str, t.Callable[["Parser"], t.Union[nodes.Node, t.List[nodes.Node]]]
67+
str, t.Callable[[Parser], t.Union[nodes.Node, t.List[nodes.Node]]]
6868
] = {}
6969
for extension in environment.iter_extensions():
7070
for tag in extension.tags:

src/jinja2/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def __init__(
172172
):
173173
self.parent = parent
174174
self.vars: t.Dict[str, t.Any] = {}
175-
self.environment: "Environment" = environment
175+
self.environment: Environment = environment
176176
self.eval_ctx = EvalContext(self.environment, name)
177177
self.exported_vars: t.Set[str] = set()
178178
self.name = name

src/jinja2/sandbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import operator
66
import types
77
import typing as t
8+
from _string import formatter_field_name_split # type: ignore
89
from collections import abc
910
from collections import deque
1011
from string import Formatter
1112

12-
from _string import formatter_field_name_split # type: ignore
1313
from markupsafe import EscapeFormatter
1414
from markupsafe import Markup
1515

src/jinja2/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class LRUCache:
428428
def __init__(self, capacity: int) -> None:
429429
self.capacity = capacity
430430
self._mapping: t.Dict[t.Any, t.Any] = {}
431-
self._queue: "te.Deque[t.Any]" = deque()
431+
self._queue: te.Deque[t.Any] = deque()
432432
self._postinit()
433433

434434
def _postinit(self) -> None:

0 commit comments

Comments
 (0)