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
{{ message }}
Repository navigation
New semantic analyzer: regression with circular import and TypeVar #7037
When mypy is run on these modules with the default arguments, no issues are reported. But when run withthe new semantic analyzer, the following happens:
$ mypy --new-semantic-analyzer box.py factory.py
factory.py:11: error: "Type[BoxT]" has no attribute "create"
The problem does not occur if there is no circular import. It also doesn't occur if the BoxT TypeVar is defined in the factory module instead of imported from the box module.
Thanks for reporting this! This seems like an important issue to fix, in particular since the new semantic analyzer is supposed to work better with import cycles :-)
Activity
JukkaL commentedon Jun 21, 2019
Thanks for reporting this! This seems like an important issue to fix, in particular since the new semantic analyzer is supposed to work better with import cycles :-)
New semantic analyzer: Prohibit duplicate type variable definitions a…