Skip to content

MyPy reports false error when using Concatenate with ParamSpec #14069

Closed as not planned

Description

@gandhis1

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).

Activity

  1. erictraut commented on Nov 11, 2022

    @erictraut

    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.

  2. gandhis1 commented on Nov 17, 2022

    @gandhis1
    Author

    This is likely related to #11855

  3. gandhis1 commented on Nov 21, 2022

    @gandhis1
    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-paramspecPEP 612, ParamSpec, Concatenate

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions