Closed hugovk closed 1 month ago
There's a new check in pyupgrade to rewrite using PEP 696 TypeVar defaults:
from collections.abc import Generator, AsyncGenerator -def f() -> Generator[int, None, None]: +def f() -> Generator[int]: yield 1
from collections.abc import Generator, AsyncGenerator -async def f() -> AsyncGenerator[int, None]: +async def f() -> AsyncGenerator[int]: yield 1
See the https://github.com/asottile/pyupgrade/pull/948/files for some variations.
May I work on this one?
I think we already have this rule implemented: UP043
There's a new check in pyupgrade to rewrite using PEP 696 TypeVar defaults:
See the https://github.com/asottile/pyupgrade/pull/948/files for some variations.