I have:
foo/
├── __init__.py
├── bar.py
└── baz
├── __init__.py
└── alice.py
In bar.py, I import Alice, which is an empty class with nothing in it but the name attribute set to "Alice".
from baz.alice import Alice
a = Alice()
print(a.name)
This runs properly:
$ python foo/bar.py
Alice
But mypy complains:
$ mypy --version
mypy 0.910
$ mypy --strict .
foo/bar.py:1: error: Cannot find implementation or library stub for module named "baz.alice"
foo/bar.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 6 source files)
Why is mypy complaining?