Closed Ezibenroc closed 7 months ago
Related to the pep 585 feature.
Running pyupgrade on this input file:
from typing import List def f(x: List[str]) -> None: pass
It currently produces this file (changing List to list):
List
list
from typing import List def f(x: list[str]) -> None: pass
I think it would be nice to produce this file instead (removing the now unused import):
def f(x: list[str]) -> None: pass
please search the issue tracker for duplicates
Related to the pep 585 feature.
Running pyupgrade on this input file:
It currently produces this file (changing
List
tolist
):I think it would be nice to produce this file instead (removing the now unused import):