You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module in the virtualenv site-packages directory are not found by mypy #7788
With every mypy release I give it a try, this release is no different and the fact that environment variables are now taken into account in the config file will be very nice to find the python from the virtual environment.
And if I try to add this path to MYPYPATH it won't work either:
(tryton-trunk) nicoe@mirabelle:projets/tryton/tryton-env/tryton-env% MYPYPATH=/home/nicoe/.local/share/virtualenvs/tryton-trunk/lib/python3.7/site-packages/sql mypy trytond/trytond/model/modelsql.py
/home/nicoe/.local/share/virtualenvs/tryton-trunk/lib/python3.7/site-packages is in the MYPYPATH. Please remove it.
See https://mypy.readthedocs.io/en/latest/running_mypy.html#how-mypy-handles-imports for more info
Since I saw some "No library stub file for module 'lxml'", I though mypy was not able to find the python-sql library while it was able to find the lxml one.
Activity
emmatyping commentedon Oct 24, 2019
Have you tried manually passing
--python-executable=via command line? Also please pass-vv, which should give more info.emmatyping commentedon Oct 24, 2019
Oh, if you are using python-sql, the package doesn't have a py.typed, nor does it have type annotations.
nicoe commentedon Oct 25, 2019
OK thanks.
Since I saw some "No library stub file for module 'lxml'", I though mypy was not able to find the python-sql library while it was able to find the lxml one.
JukkaL commentedon Oct 28, 2019
This seems like the same issue as #4542, which is already high priority.