You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are planning a major redesign of our semantic analyzer in next months that will likely solve this kind of issues. For now you can use the workarounds you found.
The underlying problem is that mypy currently doesn't support forward references to a star import. from x import * is processed at a later stage of analysis than other imports, which breaks forward references. Forward references to imported names in general are problematic at the moment though; #4687 is a related issue.
Hello,
I've encountered a bug (or I think so) when using late wildcard imports. It can be reproduced as follows:
file1.py
file2.py
This yields:
file1.py:2: error: Name 'bar' is not defined
Version with
works fine (i.e. no errors are thrown).
This version works too:
I'm using version
0.641
installed from PyPI. I encounter the same behaviour when installed from Git master (as of2680c3
).I'm not using any options (just
mypy file1.py
).Python version is
3.6.6
.The text was updated successfully, but these errors were encountered: