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
TypeError in ORM model using an enum type hint (1.4) #10065
Comments
Originally posted in the mypy repo where @AlexWaygood commented the following:
|
Hi, Can you try removing the packages |
hi - this is resolved for 1.4.49 not yet released in b39af62 |
as well as 2.0.17 already released |
so much for our typing error template |
Do you know how much time I spent finding the actual bug? Sorry, that you had to spend 15s on closing this ticket. Finding and creating a reproducible piece of code is a PITA. And yes, I didn't have time to first cover all demands that mypy has on creating issues, and then do the same in this project. And if you look at the text and title, I'm using 1.4. |
sorry, thanks very much for submitting this issue! Re: the bug reporting template we are trying to reduce the time we have to spend understanding people's reports. We get a dozen reports a day. Unfortunately the stack trace would have been sufficient here as it points to a direct issue in how we are calling a mypy API that changed (where in fact our test suite broke, so we knew about this immediately), but you didn't know that, so, sorry about that. |
Ensure stubs packages are not installed
Verify if the api is typed
Describe the typing issue
"INTERNAL ERROR" when running mypy on a file with basic ORM models.
To Reproduce
Error
Versions
requirements.txt:
Additional context
This is a condensed minimal reproducible example. In short,
Model
is my abstract base model for all ORM classes.Bar
is an ORM model that has an enum property.Declaring the column as enum would be correct, but it's not necessary to trigger the bug.
__abstract__ = True
is missing of course. Code just serves as a minimal example and doesn't make sense. I just tried to remove all distractions.The text was updated successfully, but these errors were encountered: