Skip to content

Commit 70d0521

Browse files
authored
Update stubinfo for latest typeshed (#19771)
1 parent a009879 commit 70d0521

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

misc/update-stubinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main() -> None:
5858
print("Consider removing the following packages no longer in typeshed:")
5959
print("=" * 40)
6060
for p in sorted(mypy_p - typeshed_p_to_d.keys()):
61-
if p in {"lxml", "pandas"}: # never in typeshed
61+
if p in {"lxml", "pandas", "scipy"}: # never in typeshed
6262
continue
6363
print(p)
6464

mypy/stubinfo.py

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def stub_distribution_name(module: str) -> str | None:
4545
"first": "types-first",
4646
"markdown": "types-Markdown",
4747
"mock": "types-mock",
48-
"OpenSSL": "types-pyOpenSSL",
4948
"paramiko": "types-paramiko",
5049
"polib": "types-polib",
5150
"pycurl": "types-pycurl",
@@ -75,35 +74,37 @@ def stub_distribution_name(module: str) -> str | None:
7574
# but is a non-typeshed stubs package.
7675
non_bundled_packages_flat: dict[str, str] = {
7776
"_cffi_backend": "types-cffi",
77+
"_jsonnet": "types-jsonnet",
7878
"_win32typing": "types-pywin32",
7979
"antlr4": "types-antlr4-python3-runtime",
8080
"assertpy": "types-assertpy",
81-
"atheris": "types-atheris",
81+
"auth0": "types-auth0-python",
8282
"authlib": "types-Authlib",
8383
"aws_xray_sdk": "types-aws-xray-sdk",
84+
"binaryornot": "types-binaryornot",
8485
"boltons": "types-boltons",
8586
"braintree": "types-braintree",
86-
"bs4": "types-beautifulsoup4",
8787
"bugbear": "types-flake8-bugbear",
88-
"caldav": "types-caldav",
8988
"capturer": "types-capturer",
9089
"cffi": "types-cffi",
90+
"channels": "types-channels",
9191
"chevron": "types-chevron",
9292
"click_default_group": "types-click-default-group",
9393
"click_log": "types-click-log",
94+
"click_shell": "types-click-shell",
9495
"click_web": "types-click-web",
9596
"colorama": "types-colorama",
9697
"commctrl": "types-pywin32",
97-
"commonmark": "types-commonmark",
9898
"consolemenu": "types-console-menu",
99-
"corus": "types-corus", # codespell:ignore corus
99+
"convertdate": "types-convertdate",
100100
"cronlog": "types-python-crontab",
101101
"crontab": "types-python-crontab",
102102
"crontabs": "types-python-crontab",
103-
"datemath": "types-python-datemath",
104103
"dateparser_data": "types-dateparser",
105104
"dde": "types-pywin32",
106105
"defusedxml": "types-defusedxml",
106+
"dirhash": "types-dirhash",
107+
"django_filters": "types-django-filter",
107108
"docker": "types-docker",
108109
"dockerfile_parse": "types-dockerfile-parse",
109110
"editdistance": "types-editdistance",
@@ -122,17 +123,22 @@ def stub_distribution_name(module: str) -> str | None:
122123
"flask_socketio": "types-Flask-SocketIO",
123124
"fpdf": "types-fpdf2",
124125
"gdb": "types-gdb",
126+
"geopandas": "types-geopandas",
125127
"gevent": "types-gevent",
126128
"greenlet": "types-greenlet",
129+
"grpc_channelz": "types-grpcio-channelz",
130+
"grpc_health": "types-grpcio-health-checking",
131+
"grpc_reflection": "types-grpcio-reflection",
132+
"grpc_status": "types-grpcio-status",
133+
"grpc": "types-grpcio",
127134
"hdbcli": "types-hdbcli",
135+
"hnswlib": "types-hnswlib",
128136
"html5lib": "types-html5lib",
129137
"httplib2": "types-httplib2",
130-
"humanfriendly": "types-humanfriendly",
131138
"hvac": "types-hvac",
132139
"ibm_db": "types-ibm-db",
133140
"icalendar": "types-icalendar",
134141
"import_export": "types-django-import-export",
135-
"influxdb_client": "types-influxdb-client",
136142
"inifile": "types-inifile",
137143
"isapi": "types-pywin32",
138144
"jack": "types-JACK-Client",
@@ -145,9 +151,11 @@ def stub_distribution_name(module: str) -> str | None:
145151
"jwcrypto": "types-jwcrypto",
146152
"keyboard": "types-keyboard",
147153
"ldap3": "types-ldap3",
154+
"lunardate": "types-lunardate",
148155
"lupa": "types-lupa",
149156
"lzstring": "types-lzstring",
150157
"m3u8": "types-m3u8",
158+
"management": "types-django-import-export",
151159
"mmapfile": "types-pywin32",
152160
"mmsystem": "types-pywin32",
153161
"mypy_extensions": "types-mypy-extensions",
@@ -173,6 +181,7 @@ def stub_distribution_name(module: str) -> str | None:
173181
"perfmon": "types-pywin32",
174182
"pexpect": "types-pexpect",
175183
"playhouse": "types-peewee",
184+
"pony": "types-pony",
176185
"portpicker": "types-portpicker",
177186
"psutil": "types-psutil",
178187
"psycopg2": "types-psycopg2",
@@ -181,11 +190,13 @@ def stub_distribution_name(module: str) -> str | None:
181190
"pyautogui": "types-PyAutoGUI",
182191
"pycocotools": "types-pycocotools",
183192
"pyflakes": "types-pyflakes",
184-
"pygit2": "types-pygit2",
185193
"pygments": "types-Pygments",
186194
"pyi_splash": "types-pyinstaller",
187195
"PyInstaller": "types-pyinstaller",
196+
"pyluach": "types-pyluach",
197+
"pymeeus": "types-PyMeeus",
188198
"pynput": "types-pynput",
199+
"pyperclip": "types-pyperclip",
189200
"pyscreeze": "types-PyScreeze",
190201
"pysftp": "types-pysftp",
191202
"pytest_lazyfixture": "types-pytest-lazy-fixture",
@@ -195,10 +206,12 @@ def stub_distribution_name(module: str) -> str | None:
195206
"pywintypes": "types-pywin32",
196207
"qrbill": "types-qrbill",
197208
"qrcode": "types-qrcode",
209+
"ratelimit": "types-ratelimit",
198210
"regex": "types-regex",
199211
"regutil": "types-pywin32",
200212
"reportlab": "types-reportlab",
201213
"requests_oauthlib": "types-requests-oauthlib",
214+
"rfc3339_validator": "types-rfc3339-validator",
202215
"RPi": "types-RPi.GPIO",
203216
"s2clientprotocol": "types-s2clientprotocol",
204217
"sass": "types-libsass",
@@ -210,6 +223,8 @@ def stub_distribution_name(module: str) -> str | None:
210223
"setuptools": "types-setuptools",
211224
"shapely": "types-shapely",
212225
"slumber": "types-slumber",
226+
"socks": "types-PySocks",
227+
"sockshandler": "types-PySocks",
213228
"sspicon": "types-pywin32",
214229
"str2bool": "types-str2bool",
215230
"tensorflow": "types-tensorflow",
@@ -218,14 +233,14 @@ def stub_distribution_name(module: str) -> str | None:
218233
"toposort": "types-toposort",
219234
"tqdm": "types-tqdm",
220235
"translationstring": "types-translationstring",
221-
"tree_sitter_languages": "types-tree-sitter-languages",
222236
"ttkthemes": "types-ttkthemes",
223237
"unidiff": "types-unidiff",
224238
"untangle": "types-untangle",
225239
"usersettings": "types-usersettings",
226240
"uwsgi": "types-uWSGI",
227241
"uwsgidecorators": "types-uWSGI",
228242
"vobject": "types-vobject",
243+
"watchpoints": "types-watchpoints",
229244
"webob": "types-WebOb",
230245
"whatthepatch": "types-whatthepatch",
231246
"win2kras": "types-pywin32",
@@ -282,7 +297,9 @@ def stub_distribution_name(module: str) -> str | None:
282297
"xdg": "types-pyxdg",
283298
"xdgenvpy": "types-xdgenvpy",
284299
"Xlib": "types-python-xlib",
300+
"xlrd": "types-xlrd",
285301
"xmltodict": "types-xmltodict",
302+
"yt_dlp": "types-yt-dlp",
286303
"zstd": "types-zstd",
287304
"zxcvbn": "types-zxcvbn",
288305
# Stub packages that are not from typeshed

mypy/test/teststubinfo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def test_is_legacy_bundled_packages(self) -> None:
2020
def test_stub_distribution_name(self) -> None:
2121
assert stub_distribution_name("foobar_asdf") is None
2222
assert stub_distribution_name("pycurl") == "types-pycurl"
23-
assert stub_distribution_name("bs4") == "types-beautifulsoup4"
23+
assert stub_distribution_name("psutil") == "types-psutil"
24+
assert stub_distribution_name("sassutils") == "types-libsass"
2425
assert stub_distribution_name("google.cloud.ndb") == "types-google-cloud-ndb"
2526
assert stub_distribution_name("google.cloud.ndb.submodule") == "types-google-cloud-ndb"
2627
assert stub_distribution_name("google.cloud.unknown") is None

0 commit comments

Comments
 (0)