-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Don't crash on aliases like C = C #5632
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
Conversation
Could you add a test that ensures that if module a has |
import a | ||
[file a.py] | ||
import lib | ||
x = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you also check that using lib.Exception
works here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean in this file? I can add try/except
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in this file. Something like try: ... except lib.Exception:
.
I am not sure what you mean by this, but even just |
@JelleZijlstra @JukkaL what is the situation here? Are there more comments? |
Looks good to me! |
I'm happy with the additional tests. |
Fixes #5631
Unfortunately one still needs to use
# type: ignores
, mypy has troubles understanding complex conditional definitions like in the issue:But this is a separate problem, that is harder to solve.