Skip to content

Commit 4905aad

Browse files
srittauJukkaL
authored andcommitted
Don't suggest to install stubs with py.typed files (#10652)
The pallets libraries are now bundled with a `py.typed` file. Suggesting to install these stubs only leads to confusion. See python/typeshed#5423 and python/typeshed#5642 for context.
1 parent f6e4c9e commit 4905aad

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

mypy/stubinfo.py

-8
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
3232
'certifi': StubInfo('types-certifi'),
3333
'characteristic': StubInfo('types-characteristic'),
3434
'chardet': StubInfo('types-chardet'),
35-
'click': StubInfo('types-click'),
3635
'click_spinner': StubInfo('types-click-spinner'),
3736
'concurrent': StubInfo('types-futures', py_version=2),
3837
'contextvars': StubInfo('types-contextvars', py_version=3),
3938
'croniter': StubInfo('types-croniter'),
40-
'cryptography': StubInfo('types-cryptography'),
4139
'dataclasses': StubInfo('types-dataclasses', py_version=3),
4240
'dateparser': StubInfo('types-dateparser'),
4341
'datetimerange': StubInfo('types-DateTimeRange'),
@@ -50,19 +48,14 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
5048
'fb303': StubInfo('types-fb303', py_version=2),
5149
'filelock': StubInfo('types-filelock', py_version=3),
5250
'first': StubInfo('types-first'),
53-
'flask': StubInfo('types-Flask'),
5451
'freezegun': StubInfo('types-freezegun', py_version=3),
5552
'frozendict': StubInfo('types-frozendict', py_version=3),
5653
'geoip2': StubInfo('types-geoip2'),
5754
'gflags': StubInfo('types-python-gflags'),
5855
'google.protobuf': StubInfo('types-protobuf'),
5956
'ipaddress': StubInfo('types-ipaddress', py_version=2),
60-
'itsdangerous': StubInfo('types-itsdangerous'),
61-
'jinja2': StubInfo('types-Jinja2'),
62-
'jwt': StubInfo('types-jwt'),
6357
'kazoo': StubInfo('types-kazoo', py_version=2),
6458
'markdown': StubInfo('types-Markdown'),
65-
'markupsafe': StubInfo('types-MarkupSafe'),
6659
'maxminddb': StubInfo('types-maxminddb'),
6760
'mock': StubInfo('types-mock'),
6861
'OpenSSL': StubInfo('types-openssl-python', py_version=2),
@@ -95,6 +88,5 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
9588
'tzlocal': StubInfo('types-tzlocal'),
9689
'ujson': StubInfo('types-ujson'),
9790
'waitress': StubInfo('types-waitress', py_version=3),
98-
'werkzeug': StubInfo('types-Werkzeug'),
9991
'yaml': StubInfo('types-PyYAML'),
10092
}

mypy/test/teststubinfo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def test_is_legacy_bundled_packages(self) -> None:
88
assert not is_legacy_bundled_package('foobar_asdf', 2)
99
assert not is_legacy_bundled_package('foobar_asdf', 3)
1010

11-
assert is_legacy_bundled_package('click', 2)
12-
assert is_legacy_bundled_package('click', 3)
11+
assert is_legacy_bundled_package('certifi', 2)
12+
assert is_legacy_bundled_package('certifi', 3)
1313

1414
assert is_legacy_bundled_package('scribe', 2)
1515
assert not is_legacy_bundled_package('scribe', 3)

0 commit comments

Comments
 (0)