Skip to content

Add MYPYPATH To Stubtest Documentation #8868

New issue

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

Merged
merged 4 commits into from
Oct 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ check on the command line:
(.venv3)$ python3 tests/stubtest_third_party.py Pillow toml # check stubs/Pillow and stubs/toml
```

If you have the runtime package installed in your local virtual environment, you can also run stubtest
directly, with
```
(.venv3)$ MYPYPATH=<path-to-module-stubs> python3 -m mypy.stubtest \
--custom-typeshed-dir <path-to-typeshed> \
<third-party-module>
```

For each distribution, stubtest ignores definitions listed in a `@tests/stubtest_allowlist.txt` file,
relative to the distribution. Additional packages that are needed to run stubtest for a
distribution can be added to `@tests/requirements-stubtest.txt`.
Expand Down