-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
If I have a package pkg/
and I run mypy while the current working directory is pkg
, mypy can't resolve imports from pkg
. This is consistent with how Python works (see #7389 for discussion), but it may be surprising for some users. Mypy could detect this issue and generate a note that would tell the user to switch to another directory.
More details: If an imported module can't be resolved, but the current working directory contains a __init__.py[i]
file, see if the import could be resolved if some parent directory was added to the search path. If yes, add a note suggesting that the current working directory should perhaps be changed to a parent directory.
poneill