Skip to content

Commit d54cc35

Browse files
authored
Change example in test cases with no stubs available (#16513)
Fixes #16466
1 parent eb1ee97 commit d54cc35

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test-data/unit/pythoneval.test

+6-6
Original file line numberDiff line numberDiff line change
@@ -1568,24 +1568,24 @@ note: A user-defined top-level module with name "typing" is not supported
15681568
# flags: --ignore-missing-imports
15691569
import scribe # No Python 3 stubs available for scribe
15701570
from scribe import x
1571-
import docutils # Python 3 stubs available for docutils
1571+
import python2 # Python 3 stubs available for python2
15721572
import foobar_asdf
15731573
import jack # This has a stubs package but was never bundled with mypy, so ignoring works
15741574
[out]
1575-
_testIgnoreImportIfNoPython3StubAvailable.py:4: error: Library stubs not installed for "docutils"
1576-
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: Hint: "python3 -m pip install types-docutils"
1575+
_testIgnoreImportIfNoPython3StubAvailable.py:4: error: Library stubs not installed for "python2"
1576+
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: Hint: "python3 -m pip install types-six"
15771577
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: (or run "mypy --install-types" to install all missing stub packages)
15781578
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
15791579

15801580
[case testNoPython3StubAvailable]
15811581
import scribe
15821582
from scribe import x
1583-
import docutils
1583+
import python2
15841584
[out]
15851585
_testNoPython3StubAvailable.py:1: error: Cannot find implementation or library stub for module named "scribe"
15861586
_testNoPython3StubAvailable.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
1587-
_testNoPython3StubAvailable.py:3: error: Library stubs not installed for "docutils"
1588-
_testNoPython3StubAvailable.py:3: note: Hint: "python3 -m pip install types-docutils"
1587+
_testNoPython3StubAvailable.py:3: error: Library stubs not installed for "python2"
1588+
_testNoPython3StubAvailable.py:3: note: Hint: "python3 -m pip install types-six"
15891589
_testNoPython3StubAvailable.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
15901590

15911591

0 commit comments

Comments
 (0)