typeshed
typeshed copied to clipboard
PEP 646 (Variadic Generics) tracker
- [ ] mypy (https://github.com/python/mypy/issues/12280)
- [ ] pytype
- [x] pyright
- [ ] pyre
- [ ] PyCharm (nice to have, but not required)
I've ticked off pyright; I believe it's supported PEP 646 for a while now. I've also added a link to the nominal mypy issue, though there have been a fair few PRs over at mypy working on PEP 646 support and none of them seem to have referenced that issue ¯\_(ツ)_/¯
.
PEP 646 lists Pyre as providing a reference implementation of the PEP, so they probably also have pretty good support.
PEP 646 support would be useful for (feel free to edit this):
-
asyncio.events.Handle
-
asyncio.events.TimerHandle
-
asyncio.events.AbstractEventLoop.call_at
-
asyncio.events.AbstractEventLoop.call_later
-
asyncio.events.AbstractEventLoop.call_soon
-
asyncio.base_events.BaseEventLoop.call_at
-
asyncio.base_events.BaseEventLoop.call_later
-
asyncio.base_events.BaseEventLoop.call_soon
- (Maybe):
functools.partial
(#8703) - Various functions in the
keyboard
third-party stubs:- https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/mouse.pyi#L47-L56
- https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/init.pyi#L37
- https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/init.pyi#L58-L65
Note that we won't be able to use PEP 646 as it currently stands for builtins.map
, builtins.zip
or asyncio.gather
: https://github.com/python/cpython/pull/32103#discussion_r836917997
This is now used in several places.