Skip to content

Commit 7003579

Browse files
authored
Merge pull request #850 from asottile/typevar-bounds-always-unquote
3.12 TypeVar bounds are always unquotable
2 parents b8aa8c0 + 07ff314 commit 7003579

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

pyupgrade/_plugins/typing_pep563.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,5 @@ def visit_TypeVar(
185185
node: ast.TypeVar,
186186
parent: ast.AST,
187187
) -> Iterable[tuple[Offset, TokenFunc]]:
188-
if not _supported_version(state):
189-
return
190188
if node.bound is not None:
191189
yield from _replace_string_literal(node.bound)

tests/features/typing_pep563_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
'x: Annotated[1:2] = ...\n',
5757
id='Annotated with invalid slice',
5858
),
59-
pytest.param(
60-
'def f[X: "int"](x: X) -> X: return x\n',
61-
id='TypeVar quoted bound but no __future__ annotations',
62-
),
6359
pytest.param(
6460
'from __future__ import annotations\n'
6561
'def f[X](x: X) -> X: return x\n',

0 commit comments

Comments
 (0)