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
I have a question/bug that may be related to this bug and to this pep-0561 but I am using mypy maybe this is the right place to ask-
I have two modules/package:
A with inline typing information - it is an internal package and it won't probably be open source. We distribute package A with an internal pipy server.
Module B uses module A and wants to make use of A typing information.
Installing the package:
If I do: pip install A or using python setup.py develop / pip install -e . and then try to check with mypy files from module B that import module A I get the message:
B/foo.py:14: error: Cannot find module named `A`
B/foo.py:14: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
In my case I don't want to use --ignore-missing-imports as module A has type annotations.
I could use MYPYPATH but that would mean that I have to set it for each of my internal packages that contain type annotation.
So the question:
Is there a recommended way to distribute type annotation for non-opensource libraries that mypy can automatically use it?
The text was updated successfully, but these errors were encountered:
At the moment MYPYPATH is the best way. I have an implementation in #4403 of PEP 561 that will probably not make it in the merge window for mypy 0.570, but it should be included in mypy 0.580. You may also want to read #2625.
Hi,
I have a question/bug that may be related to this bug and to this pep-0561 but I am using mypy maybe this is the right place to ask-
I have two modules/package:
Installing the package:
If I do:
pip install A
or usingpython setup.py develop
/pip install -e .
and then try to check with mypy files from module B that import module A I get the message:In my case I don't want to use
--ignore-missing-imports
as module A has type annotations.I could use MYPYPATH but that would mean that I have to set it for each of my internal packages that contain type annotation.
So the question:
Is there a recommended way to distribute type annotation for non-opensource libraries that mypy can automatically use it?
The text was updated successfully, but these errors were encountered: