Skip to content
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

MyPy reports false error when using Concatenate with ParamSpec #14069

Closed
gandhis1 opened this issue Nov 11, 2022 · 3 comments
Closed

MyPy reports false error when using Concatenate with ParamSpec #14069

gandhis1 opened this issue Nov 11, 2022 · 3 comments
Labels
bug mypy got something wrong topic-paramspec PEP 612, ParamSpec, Concatenate

Comments

@gandhis1
Copy link

I confirmed that this was a bug here: python/typing#1286

Here is the final code snippet: https://mypy-play.net/?mypy=master&python=3.10&gist=ecbe2855b2c84a0ed7e5820fae2da90b&flags=strict

I searched this GitHub for similar issues and everything I see seems to imply that PEP 612 is fully supported (older issues that reported bugs were closed).

@gandhis1 gandhis1 added the bug mypy got something wrong label Nov 11, 2022
@JelleZijlstra JelleZijlstra added the topic-paramspec PEP 612, ParamSpec, Concatenate label Nov 11, 2022
@erictraut
Copy link

ParamSpec and Concatenate add many new considerations and edge cases for a type checker. It took me a long time to work out all of the issues in pyright's PEP 612 implementation, and every time a bug was reported I augmented our test suite. At this point, pyright's PEP 612 tests are pretty comprehensive. Mypy maintainers are welcome to leverage these tests if you find them helpful. They are located in this directory, and the individual files are named paramSpec*.py.

@gandhis1
Copy link
Author

This is likely related to #11855

@gandhis1
Copy link
Author

Closing this issue as it is redundant with #11855. I checked out the working branch from #14159 and confirmed it works successfully on the sample code in this PR.

@gandhis1 gandhis1 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-paramspec PEP 612, ParamSpec, Concatenate
Projects
None yet
Development

No branches or pull requests

3 participants