We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
stubs/
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I create a file foo.py with import toml and execute mypy foo.py --custom-typeshed-dir my-typeshed/ I get:
foo.py
import toml
mypy foo.py --custom-typeshed-dir my-typeshed/
foo.py:1: error: Library stubs not installed for "toml" (or incompatible with Python 3.9) foo.py:1: note: Hint: "python3 -m pip install types-toml" foo.py:1: note: (or run "mypy --install-types" to install all missing stub packages) foo.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 1 source file)
Although my-typeshed/stubs/ contains toml/.
my-typeshed/stubs/
toml/
I find this really inconvenient because I'd like to test my third-party stub typeshed contributions with mypy.
It's worth noting that pyright handles this, pyright foo.py --typeshed-path my-typeshed/ works as expected.
pyright foo.py --typeshed-path my-typeshed/
The text was updated successfully, but these errors were encountered:
This works, but is probably not documented anywhere and we should at least document it: MYPYPATH=stubs/toml/ foo.py
MYPYPATH=stubs/toml/ foo.py
Sorry, something went wrong.
Mention how to test third party stubs
b92fbe1
Fixes python#12241
Mention how to test third party stubs (#13505)
17ec3ca
Fixes #12241
Successfully merging a pull request may close this issue.
When I create a file
foo.py
withimport toml
and executemypy foo.py --custom-typeshed-dir my-typeshed/
I get:Although
my-typeshed/stubs/
containstoml/
.I find this really inconvenient because I'd like to test my third-party stub typeshed contributions with mypy.
It's worth noting that pyright handles this,
pyright foo.py --typeshed-path my-typeshed/
works as expected.The text was updated successfully, but these errors were encountered: