Skip to content

Commit 69fdc2d

Browse files
authored
stubtest: improve docs (#13293)
1 parent ecc653b commit 69fdc2d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/source/stubtest.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Here's a quick example of what stubtest can do:
7272
Stub: at line 1
7373
builtins.int
7474
Runtime:
75-
hello, stubtest
75+
'hello, stubtest'
7676
7777
7878
Usage
@@ -86,7 +86,14 @@ is installed in the same environment as the library to be tested. In some
8686
cases, setting ``PYTHONPATH`` can help stubtest find the code to import.
8787

8888
Similarly, stubtest must be able to find the stubs to be checked. Stubtest
89-
respects the ``MYPYPATH`` environment variable.
89+
respects the ``MYPYPATH`` environment variable -- consider using this if you
90+
receive a complaint along the lines of "failed to find stubs".
91+
92+
Note that stubtest requires mypy to be able to analyse stubs. If mypy is unable
93+
to analyse stubs, you may get an error on the lines of "not checking stubs due
94+
to mypy build errors". In this case, you will need to mitigate those errors
95+
before stubtest will run. Despite potential overlap in errors here, stubtest is
96+
not intended as a substitute for running mypy directly.
9097

9198
If you wish to ignore some of stubtest's complaints, stubtest supports a
9299
pretty handy allowlist system.

0 commit comments

Comments
 (0)