-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
PEP 612 (Parameter Specification variables) tracker #4827
Comments
@mrkmndz I assume pyre already supports these? |
Yup! |
Pyright has had full support for PEP 612 for a long time now. |
@rchen152 Does pytype support PEP 612? If not, would you mind me creating a ticket that we can reference from here? |
pytype does not yet support this. I opened google/pytype#786. |
Cc @sproshev |
Not yet planned :( Will post updates here. |
Is there any update on this issue? Has anyone started to work on the support in mypy? Pytype? I'm aware that full support for PEP 612 is not easy to implement, but perhaps some minimal support could be added that simply treats all ParamSpecs as Maybe we need to think about ways to support declarations that are conditioned on support for specific type checking features. Perhaps something like a |
I think work on mypy support has stalled. Another, more forceful, approach could be that we simply start using them in typeshed (perhaps with a liberal sprinkling of type ignores). It would then be individual type checkers' responsibilities to add support for new features, and the ecosystem can move forward without having to wait for the slowest type checker to update itself. We could start doing this say six months or a year after a PEP has been accepted. |
Could we just cheat and derive But in general I agree that we should be more aggressive about adding features, so as not to hold more up-to-date type checkers back. |
|
|
mypy still seems to have problems with |
Yeap, though there are some issues and limitations in PyCharm |
Now partly supported by mypy, no support for |
I checkmarked pytype. While it doesn't support |
This PR adds a new Parameters proper type to represent ParamSpec parameters (more about this in the PR), along with supporting the Concatenate operator. Closes #11833 Closes #12276 Closes #12257 Refs #8645 External ref python/typeshed#4827 Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
I think we can now use ParamSpec without limitations in typeshed. |
There's still a mypy bug I'm waiting on: #7689 (comment). I'll add it to the tracker. |
This comment was marked as off-topic.
This comment was marked as off-topic.
The mypy issue has now been closed! |
This issue is supposed to track when we can start to use parameter specification variables (PEP 612) in typeshed. Support is needed in released versions of:
ParamSpec
supportConcatenate
support (PEP-612 Concatenate not recognized properly mypy#11833)ParamSpec
(Class Generic ParamSpec cannot be used in Callable mypy#12011)The text was updated successfully, but these errors were encountered: