-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Crash when TypeVar of Generic dataclass has undefined bound #12527
Labels
Comments
Looks like it's dataclasses-specific. I can reproduce with dataclasses, but not without. |
Cc. @JelleZijlstra as well :) |
I always like more test cases when we fix something. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crash Report
MyPy crashes when run against a Generic dataclass using a TypeVar with an ill-defined bound which is passed in quotes.
Traceback
To Reproduce
Run mypy against the following Python module (
crash.py
):N.B.:
The crash does not happen (and mypy reports
crash.py:4: error: Name "NotDefined" is not defined
as expected) if:NotDefined
is passed without quotesx: float
is replaced with...
T
is not defined at allYour Environment
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: