Skip to content

Commit 10dfafe

Browse files
authored
Remove stubs packages from stubinfo.py where the runtime package has added a py.typed file (#16226)
All of these stubs packages have been removed from typeshed, due to the runtime package having added a `py.typed` file.
1 parent a1df335 commit 10dfafe

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

mypy/stubinfo.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,14 @@ def stub_distribution_name(prefix: str) -> str:
2626
"croniter": "types-croniter",
2727
"dataclasses": "types-dataclasses",
2828
"dateparser": "types-dateparser",
29-
"datetimerange": "types-DateTimeRange",
3029
"dateutil": "types-python-dateutil",
3130
"decorator": "types-decorator",
3231
"deprecated": "types-Deprecated",
3332
"docutils": "types-docutils",
3433
"first": "types-first",
35-
"geoip2": "types-geoip2",
3634
"gflags": "types-python-gflags",
3735
"google.protobuf": "types-protobuf",
3836
"markdown": "types-Markdown",
39-
"maxminddb": "types-maxminddb",
4037
"mock": "types-mock",
4138
"OpenSSL": "types-pyOpenSSL",
4239
"paramiko": "types-paramiko",
@@ -80,8 +77,6 @@ def stub_distribution_name(prefix: str) -> str:
8077
"PIL": "types-Pillow",
8178
"PyInstaller": "types-pyinstaller",
8279
"Xlib": "types-python-xlib",
83-
"annoy": "types-annoy",
84-
"appdirs": "types-appdirs",
8580
"aws_xray_sdk": "types-aws-xray-sdk",
8681
"babel": "types-babel",
8782
"backports.ssl_match_hostname": "types-backports.ssl_match_hostname",
@@ -96,7 +91,6 @@ def stub_distribution_name(prefix: str) -> str:
9691
"consolemenu": "types-console-menu",
9792
"crontab": "types-python-crontab",
9893
"d3dshot": "types-D3DShot",
99-
"dj_database_url": "types-dj-database-url",
10094
"dockerfile_parse": "types-dockerfile-parse",
10195
"docopt": "types-docopt",
10296
"editdistance": "types-editdistance",
@@ -111,7 +105,6 @@ def stub_distribution_name(prefix: str) -> str:
111105
"flake8_typing_imports": "types-flake8-typing-imports",
112106
"flask_cors": "types-Flask-Cors",
113107
"flask_migrate": "types-Flask-Migrate",
114-
"flask_sqlalchemy": "types-Flask-SQLAlchemy",
115108
"fpdf": "types-fpdf2",
116109
"gdb": "types-gdb",
117110
"google.cloud.ndb": "types-google-cloud-ndb",
@@ -162,7 +155,6 @@ def stub_distribution_name(prefix: str) -> str:
162155
"tree_sitter": "types-tree-sitter",
163156
"tree_sitter_languages": "types-tree-sitter-languages",
164157
"ttkthemes": "types-ttkthemes",
165-
"urllib3": "types-urllib3",
166158
"vobject": "types-vobject",
167159
"whatthepatch": "types-whatthepatch",
168160
"win32": "types-pywin32",
@@ -172,7 +164,6 @@ def stub_distribution_name(prefix: str) -> str:
172164
"win32comext": "types-pywin32",
173165
"win32gui": "types-pywin32",
174166
"xmltodict": "types-xmltodict",
175-
"xxhash": "types-xxhash",
176167
"zxcvbn": "types-zxcvbn",
177168
# Stub packages that are not from typeshed
178169
# Since these can be installed automatically via --install-types, we have a high trust bar

test-data/unit/pythoneval.test

Lines changed: 6 additions & 6 deletions
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 maxminddb # Python 3 stubs available for maxminddb
1571+
import docutils # Python 3 stubs available for docutils
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 "maxminddb"
1576-
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: Hint: "python3 -m pip install types-maxminddb"
1575+
_testIgnoreImportIfNoPython3StubAvailable.py:4: error: Library stubs not installed for "docutils"
1576+
_testIgnoreImportIfNoPython3StubAvailable.py:4: note: Hint: "python3 -m pip install types-docutils"
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 maxminddb
1583+
import docutils
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 "maxminddb"
1588-
_testNoPython3StubAvailable.py:3: note: Hint: "python3 -m pip install types-maxminddb"
1587+
_testNoPython3StubAvailable.py:3: error: Library stubs not installed for "docutils"
1588+
_testNoPython3StubAvailable.py:3: note: Hint: "python3 -m pip install types-docutils"
15891589
_testNoPython3StubAvailable.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
15901590

15911591

0 commit comments

Comments
 (0)