python / typing_extensions

Backported and experimental type hints for Python
Other
446 stars 110 forks source link

Support ParamSpec for TypeAliasType #449

Closed Daraan closed 23 hours ago

Daraan commented 3 months ago

Fixes #448 that usage of ParamSpec with TypeAliasType was limited for < Python 3.11

This PR enables TypeAliasType to use Ellipsis and list arguments for ParamSpec type params.

Daraan commented 2 months ago

Currently pyright is not happy with the synatx and does not infer the types correctly anymore. Waiting for https://github.com/microsoft/pyright/issues/9027

EDIT: The pyright problem is caused by a global P where P is a Protocol. I've addressed this, see the other comment.

Daraan commented 2 months ago

This has merge conflicts now; could you take a look?

Thank you. ;y IDE is buggy today and I merged it incorrectly. on it