mypy complain cannot find stub for my own pakage

Viewed 61

followed this link, I created *.pyi for all my modules and py.typed file for the package. in setup.py I did:

package_data={"": ["*.pyi", "*/*.pyi", "*/py.typed"]}

If I look into the pip installed directory I can see all the pyi and py.typed file. However, if I import my package in other project, mypy still complain that it cannot find the stub files. If I do pip3 install -e ./ for the package. It actually works fine. Any idea why the mypy cannot find the stub in normal installation?

update

The problem actually due to I installed the packages in to different locations other than the standard places. Somehow the mypy does not respect the PYTHONPATH

0 Answers
Related