From 4dd954f2ae3086eea59e2dfbf115af99a76451dc Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 16 Jun 2021 16:32:37 +0200 Subject: [PATCH] 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. --- mypy/stubinfo.py | 8 -------- mypy/test/teststubinfo.py | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/mypy/stubinfo.py b/mypy/stubinfo.py index 8cc72d0199a7..ad6f378a717f 100644 --- a/mypy/stubinfo.py +++ b/mypy/stubinfo.py @@ -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'), @@ -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), @@ -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'), } diff --git a/mypy/test/teststubinfo.py b/mypy/test/teststubinfo.py index e05ba879aea2..62346ce2bc9f 100644 --- a/mypy/test/teststubinfo.py +++ b/mypy/test/teststubinfo.py @@ -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)