-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
(regression: 0.960) Generic[Protocol] fails with dataclass #12876
Labels
Comments
JSS95
changed the title
(regression: 0.960) Generic[Protocol] fails
(regression: 0.960) Generic[Protocol] fails with dataclass
May 26, 2022
Thanks for opening a new issue with repro! mypy_primer bisects this to #12762 |
JukkaL
added a commit
that referenced
this issue
May 30, 2022
The plugin may add attributes that are needed to perform the bound check. Fixes #12876.
JukkaL
added a commit
that referenced
this issue
May 30, 2022
The plugin may add attributes that are needed to perform the bound check. Fixes #12876.
JukkaL
added a commit
that referenced
this issue
Jun 1, 2022
The plugin may add attributes that are needed to perform the bound check. Fixes #12876.
Hello. I am encountering the same issue again. |
Add ClassVar to the Protocol, I think |
@hauntsaninja Thanks! It worked. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
The following code uses Generic with Protocol for dataclass. It passes with mypy 0.950, but fails with 0.960.
Error messge:
Your Environment
mypy.ini
(and other config files): no config(Edit)
Using
typing.ClassVar
fixes this.The text was updated successfully, but these errors were encountered: