-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Crash following a class-level import #7045
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
Comments
This still crashes on master. The situation is quite rare however, so setting priority to normal. |
Ok, I experienced the same issue and found a workaround.
In this way I can declare functions for the same class across multiple modules and keep mypy happy. |
Fixes python#11045, fixes huggingface/transformers#13390 Fixes python#10488 Fixes python#7045 Fixes python#7806 Fixes python#11641 Fixes python#11351 Fixes python#10488 Co-authored-by: @A5rocks
Sample code:
Using latest mypy master (last release also crashes, though with a different traceback):
(Yes this is silly. I have a class where some methods are hand-written and some are output by a code generator, so the idea is that
a.py
is generated and thenb.py
assembles the generated and hand-written bits together into a class.)The text was updated successfully, but these errors were encountered: