Skip to content

Commit

Permalink
Don't suggest to install stubs with py.typed files (#10652)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
srittau authored and JukkaL committed Jun 18, 2021
1 parent f6e4c9e commit 4905aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions mypy/stubinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
'certifi': StubInfo('types-certifi'),
'characteristic': StubInfo('types-characteristic'),
'chardet': StubInfo('types-chardet'),
'click': StubInfo('types-click'),
'click_spinner': StubInfo('types-click-spinner'),
'concurrent': StubInfo('types-futures', py_version=2),
'contextvars': StubInfo('types-contextvars', py_version=3),
'croniter': StubInfo('types-croniter'),
'cryptography': StubInfo('types-cryptography'),
'dataclasses': StubInfo('types-dataclasses', py_version=3),
'dateparser': StubInfo('types-dateparser'),
'datetimerange': StubInfo('types-DateTimeRange'),
Expand All @@ -50,19 +48,14 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
'fb303': StubInfo('types-fb303', py_version=2),
'filelock': StubInfo('types-filelock', py_version=3),
'first': StubInfo('types-first'),
'flask': StubInfo('types-Flask'),
'freezegun': StubInfo('types-freezegun', py_version=3),
'frozendict': StubInfo('types-frozendict', py_version=3),
'geoip2': StubInfo('types-geoip2'),
'gflags': StubInfo('types-python-gflags'),
'google.protobuf': StubInfo('types-protobuf'),
'ipaddress': StubInfo('types-ipaddress', py_version=2),
'itsdangerous': StubInfo('types-itsdangerous'),
'jinja2': StubInfo('types-Jinja2'),
'jwt': StubInfo('types-jwt'),
'kazoo': StubInfo('types-kazoo', py_version=2),
'markdown': StubInfo('types-Markdown'),
'markupsafe': StubInfo('types-MarkupSafe'),
'maxminddb': StubInfo('types-maxminddb'),
'mock': StubInfo('types-mock'),
'OpenSSL': StubInfo('types-openssl-python', py_version=2),
Expand Down Expand Up @@ -95,6 +88,5 @@ def is_legacy_bundled_package(prefix: str, py_version: int) -> bool:
'tzlocal': StubInfo('types-tzlocal'),
'ujson': StubInfo('types-ujson'),
'waitress': StubInfo('types-waitress', py_version=3),
'werkzeug': StubInfo('types-Werkzeug'),
'yaml': StubInfo('types-PyYAML'),
}
4 changes: 2 additions & 2 deletions mypy/test/teststubinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def test_is_legacy_bundled_packages(self) -> None:
assert not is_legacy_bundled_package('foobar_asdf', 2)
assert not is_legacy_bundled_package('foobar_asdf', 3)

assert is_legacy_bundled_package('click', 2)
assert is_legacy_bundled_package('click', 3)
assert is_legacy_bundled_package('certifi', 2)
assert is_legacy_bundled_package('certifi', 3)

assert is_legacy_bundled_package('scribe', 2)
assert not is_legacy_bundled_package('scribe', 3)
Expand Down

0 comments on commit 4905aad

Please sign in to comment.