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 not recognizing ParamSpec usage with Generic #11362

Closed
shughes-uk opened this issue Oct 19, 2021 · 2 comments
Closed

MyPy not recognizing ParamSpec usage with Generic #11362

shughes-uk opened this issue Oct 19, 2021 · 2 comments
Labels
bug mypy got something wrong

Comments

@shughes-uk
Copy link

Bug Report

Some latest MRs intend to make ParamSpec ignored, but do not seem to cover the use case of ParamSpec with Generic

To Reproduce

from typing import Generic

from typing_extensions import ParamSpec

P = ParamSpec("P")


class Test(Generic[P]):
    pass

Expected Behavior

MyPy should detect no errors

Actual Behavior

error: Free type variable expected in Generic[...]

Your Environment

  • Mypy version used: mypy 0.920+dev.9aaeef5f355509ef789dbcdca1f15793698a5960
  • Mypy command-line flags: N/A
  • Mypy configuration options from mypy.ini (and other config files): N/A
  • Python version used: 3.8.5
  • Operating system and version: OSX
@shughes-uk shughes-uk added the bug mypy got something wrong label Oct 19, 2021
@sobolevn
Copy link
Member

Related #8645

@97littleleaf11
Copy link
Collaborator

Fixed by recent PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

3 participants