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
Mypy complains about this code, even though it's valid Python:
if x:
m = None
else:
import m
The most obvious way to fix this would be to add support for "module types" for specific modules. In the above example, m would be a variable with a partial None type initially. The import statement would switch the partial type to the type of module m.
Mypy complains about this code, even though it's valid Python:
The most obvious way to fix this would be to add support for "module types" for specific modules. In the above example,
m
would be a variable with a partialNone
type initially. The import statement would switch the partial type to the type of modulem
.(This is derived from discussion in #649.)
The text was updated successfully, but these errors were encountered: