skip to content

mypy: found module but no type hints or library stubs

Linting a Python project, I was puzzled by the mysterious error: "found module but no type hints or library stubs" from mypy. The module was my own, with Pydantic definitions everywhere, so why the error? I was missing init.py files in some parent folders.