Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

mypy Cannot find implementation or library stub for module

$
0
0

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 Alicea = Alice()print(a.name)

This runs properly:

$ python foo/bar.pyAlice

But mypy complains:

$ mypy --versionmypy 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-importsFound 1 error in 1 file (checked 6 source files)

Why is mypy complaining?


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>