Skip to content

Commit 47ff5ca

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 79ae23e commit 47ff5ca

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

jsonschema_lexer/_lexer.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,23 @@ def _find_rightmost_token_index(
6868
syntax_stack: list[tuple[int, str]],
6969
token: str | None,
7070
):
71-
return next((i for i, (_, t) in reversed(list(enumerate(syntax_stack))) if t == token), None)
71+
return next(
72+
(
73+
i
74+
for i, (_, t) in reversed(list(enumerate(syntax_stack)))
75+
if t == token
76+
),
77+
None,
78+
)
7279

7380
def _find_key_value_from_json(
7481
self,
7582
tokens: list[tuple[int, Any, str]],
7683
index: int,
7784
):
78-
return next((t[2] for t in tokens[index:] if t[1] is Token.String.Double), None)
85+
return next(
86+
(t[2] for t in tokens[index:] if t[1] is Token.String.Double), None
87+
)
7988

8089
def _get_nearest_valid_dialect(
8190
self,

0 commit comments

Comments
 (0)