We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b8aa8c0 + 07ff314 commit 7003579Copy full SHA for 7003579
pyupgrade/_plugins/typing_pep563.py
@@ -185,7 +185,5 @@ def visit_TypeVar(
185
node: ast.TypeVar,
186
parent: ast.AST,
187
) -> Iterable[tuple[Offset, TokenFunc]]:
188
- if not _supported_version(state):
189
- return
190
if node.bound is not None:
191
yield from _replace_string_literal(node.bound)
tests/features/typing_pep563_test.py
@@ -56,10 +56,6 @@
56
'x: Annotated[1:2] = ...\n',
57
id='Annotated with invalid slice',
58
),
59
- pytest.param(
60
- 'def f[X: "int"](x: X) -> X: return x\n',
61
- id='TypeVar quoted bound but no __future__ annotations',
62
- ),
63
pytest.param(
64
'from __future__ import annotations\n'
65
'def f[X](x: X) -> X: return x\n',
0 commit comments