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
Cannot determine type Issue with near import loops #1185
This is a known problem (though there doesn't seem to be an open issue). If there are cyclic module dependencies, type inference often needs help because mypy does only a single type checking pass.
In this particular case, you may want to rewrite cases like this:
That workaround worked for the sqlalchemy stubs; I had actually tried it before unsuccessfully, but I now suspect that was due to an unrelated problem.
Activity
JukkaL commentedon Jan 28, 2016
This is a known problem (though there doesn't seem to be an open issue). If there are cyclic module dependencies, type inference often needs help because mypy does only a single type checking pass.
In this particular case, you may want to rewrite cases like this:
into something like this:
Let me know if that works for you.
timabbott commentedon Jan 28, 2016
That workaround worked for the sqlalchemy stubs; I had actually tried it before unsuccessfully, but I now suspect that was due to an unrelated problem.
JukkaL commentedon Feb 4, 2016
Closing as this seems like a special case of #481.