Skip to content

Commit 70e48ff

Browse files
Mention how to run stubtest directly on third party stubs (#8868)
Signed-off-by: Hassan Abouelela <[email protected]>
1 parent 6a2232a commit 70e48ff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ check on the command line:
136136
(.venv3)$ python3 tests/stubtest_third_party.py Pillow toml # check stubs/Pillow and stubs/toml
137137
```
138138

139+
If you have the runtime package installed in your local virtual environment, you can also run stubtest
140+
directly, with
141+
```
142+
(.venv3)$ MYPYPATH=<path-to-module-stubs> python3 -m mypy.stubtest \
143+
--custom-typeshed-dir <path-to-typeshed> \
144+
<third-party-module>
145+
```
146+
139147
For each distribution, stubtest ignores definitions listed in a `@tests/stubtest_allowlist.txt` file,
140148
relative to the distribution. Additional packages that are needed to run stubtest for a
141149
distribution can be added to `@tests/requirements-stubtest.txt`.

0 commit comments

Comments
 (0)