Skip to content

Commit

Permalink
py38 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Aug 20, 2024
1 parent 238a35a commit 3b68a73
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,7 @@ def visit_Call(self, node: ast.Call) -> None:
self.error(node, Y031)
return
elif _is_deprecated(function):
with (
self.string_literals_allowed.enabled(),
self.long_strings_allowed.enabled(),
):
with self.string_literals_allowed.enabled(), self.long_strings_allowed.enabled():
for arg in chain(node.args, node.keywords):
self.visit(arg)
return
Expand Down Expand Up @@ -1577,10 +1574,7 @@ def _visit_slice_tuple(self, node: ast.Tuple, parent: str | None) -> None:
# Allow literals, except in the first argument
if len(node.elts) > 1:
self.visit(node.elts[0])
with (
self.string_literals_allowed.enabled(),
self.long_strings_allowed.enabled(),
):
with self.string_literals_allowed.enabled(), self.long_strings_allowed.enabled():
for elt in node.elts[1:]:
self.visit(elt)
else:
Expand Down

0 comments on commit 3b68a73

Please sign in to comment.