-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PEP 612: Parameter Specification Variables #786
Labels
Comments
8 tasks
Assigning to myself to implement the "first step" described above, to unblock typeshed. |
rchen152
added a commit
that referenced
this issue
Apr 2, 2021
pytype will gracefully fall back to Any when typing.ParamSpec or typing.Concatenate is used as the first argument to a Callable in a type stub, allowing typeshed to start using most of PEP 612. Custom generic classes parameterized with a ParamSpec are still not supported. pytype was reporting weird [bad-unpacking] errors in parser.py, so I kept adding ast3.AST annotations until they went away. I also fixed a bug in PrintVisitor that caused it to print typing_extensions imports as aliases rather than imports. For #786. PiperOrigin-RevId: 366342708
It's now possible to use a ParamSpec or Concatenate as the first argument to a Callable in type stubs. |
rchen152
added a commit
that referenced
this issue
Aug 11, 2021
pytype does not yet support typing.ParamSpec. We were already replacing instances of ParamSpec itself with Any, but ParamSpec also has args and kwargs attributes that need to be replaced. Context: python/typeshed#5896 For #786 PiperOrigin-RevId: 390166645
rchen152
added a commit
that referenced
this issue
Nov 2, 2021
This is to unblock python/typeshed#6221. Also see #786. PiperOrigin-RevId: 407168815
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PEP: https://www.python.org/dev/peps/pep-0612/
As a simple first step, we should add ParamSpec and Concatenate to the typing stub so typeshed can start using them (python/typeshed#4827).
The text was updated successfully, but these errors were encountered: