From 3864d6be97ee296e5835d9bf7208034051266085 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Thu, 8 Dec 2022 18:58:13 +0000 Subject: [PATCH 1/2] Update `stubinfo.py` for recent typeshed changes --- mypy/stubinfo.py | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/mypy/stubinfo.py b/mypy/stubinfo.py index b8dea5d0046b..8711fa92ea15 100644 --- a/mypy/stubinfo.py +++ b/mypy/stubinfo.py @@ -20,14 +20,11 @@ def stub_package_name(prefix: str) -> str: # Package name can have one or two components ('a' or 'a.b'). legacy_bundled_packages = { "aiofiles": "types-aiofiles", - "atomicwrites": "types-atomicwrites", - "attr": "types-attrs", "backports": "types-backports", "backports_abc": "types-backports_abc", "bleach": "types-bleach", "boto": "types-boto", "cachetools": "types-cachetools", - "chardet": "types-chardet", "click_spinner": "types-click-spinner", "contextvars": "types-contextvars", "croniter": "types-croniter", @@ -38,7 +35,6 @@ def stub_package_name(prefix: str) -> str: "decorator": "types-decorator", "deprecated": "types-Deprecated", "docutils": "types-docutils", - "emoji": "types-emoji", "first": "types-first", "geoip2": "types-geoip2", "gflags": "types-python-gflags", @@ -64,7 +60,6 @@ def stub_package_name(prefix: str) -> str: "six": "types-six", "slugify": "types-python-slugify", "tabulate": "types-tabulate", - "termcolor": "types-termcolor", "toml": "types-toml", "typed_ast": "types-typed-ast", "tzlocal": "types-tzlocal", @@ -83,10 +78,14 @@ def stub_package_name(prefix: str) -> str: # Note that these packages are omitted for now: # sqlalchemy: It's unclear which stub package to suggest. There's also # a mypy plugin available. +# pika: These stubs exist in typeshed, but aren't being uploaded +# to PyPI at the moment (types-pika already exists on PyPI, +# but is a non-typeshed stubs package). non_bundled_packages = { "MySQLdb": "types-mysqlclient", "PIL": "types-Pillow", "PyInstaller": "types-pyinstaller", + "Xlib": "types-python-xlib", "annoy": "types-annoy", "appdirs": "types-appdirs", "aws_xray_sdk": "types-aws-xray-sdk", @@ -100,9 +99,11 @@ def stub_package_name(prefix: str) -> str: "chevron": "types-chevron", "colorama": "types-colorama", "commonmark": "types-commonmark", - "cryptography": "types-cryptography", + "consolemenu": "types-console-menu", + "crontab": "types-python-crontab", "d3dshot": "types-D3DShot", "dj_database_url": "types-dj-database-url", + "dockerfile_parse": "types-dockerfile-parse", "docopt": "types-docopt", "editdistance": "types-editdistance", "entrypoints": "types-entrypoints", @@ -115,6 +116,7 @@ def stub_package_name(prefix: str) -> str: "flake8_simplify": "types-flake8-simplify", "flake8_typing_imports": "types-flake8-typing-imports", "flask_cors": "types-Flask-Cors", + "flask_migrate": "types-Flask-Migrate", "flask_sqlalchemy": "types-Flask-SQLAlchemy", "fpdf": "types-fpdf2", "gdb": "types-gdb", @@ -134,22 +136,28 @@ def stub_package_name(prefix: str) -> str: "oauthlib": "types-oauthlib", "openpyxl": "types-openpyxl", "opentracing": "types-opentracing", + "paho.mqtt": "types-paho-mqtt", "parsimonious": "types-parsimonious", "passlib": "types-passlib", "passpy": "types-passpy", + "peewee": "types-peewee", "pep8ext_naming": "types-pep8-naming", "playsound": "types-playsound", - "prettytable": "types-prettytable", "psutil": "types-psutil", "psycopg2": "types-psycopg2", "pyaudio": "types-pyaudio", "pyautogui": "types-PyAutoGUI", + "pycocotools": "types-pycocotools", "pyflakes": "types-pyflakes", "pygments": "types-Pygments", "pyi_splash": "types-pyinstaller", "pynput": "types-pynput", + "pythoncom": "types-pywin32", + "pythonwin": "types-pywin32", + "pyscreeze": "types-PyScreeze", "pysftp": "types-pysftp", "pytest_lazyfixture": "types-pytest-lazy-fixture", + "pywintypes": "types-pywin32", "regex": "types-regex", "send2trash": "types-Send2Trash", "slumber": "types-slumber", @@ -163,6 +171,12 @@ def stub_package_name(prefix: str) -> str: "urllib3": "types-urllib3", "vobject": "types-vobject", "whatthepatch": "types-whatthepatch", + "win32": "types-pywin32", + "win32api": "types-pywin32", + "win32con": "types-pywin32", + "win32com": "types-pywin32", + "win32comext": "types-pywin32", + "win32gui": "types-pywin32", "xmltodict": "types-xmltodict", "xxhash": "types-xxhash", "zxcvbn": "types-zxcvbn", From 9fb2489aa8daaec421f569ad686397f6b9a6fcd1 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 14 Dec 2022 14:07:08 +0000 Subject: [PATCH 2/2] Update comment on `types-pika` --- mypy/stubinfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mypy/stubinfo.py b/mypy/stubinfo.py index 8711fa92ea15..15bd96d9f4b4 100644 --- a/mypy/stubinfo.py +++ b/mypy/stubinfo.py @@ -78,9 +78,9 @@ def stub_package_name(prefix: str) -> str: # Note that these packages are omitted for now: # sqlalchemy: It's unclear which stub package to suggest. There's also # a mypy plugin available. -# pika: These stubs exist in typeshed, but aren't being uploaded -# to PyPI at the moment (types-pika already exists on PyPI, -# but is a non-typeshed stubs package). +# pika: typeshed's stubs are on PyPI as types-pika-ts. +# types-pika already exists on PyPI, and is more complete in many ways, +# but is a non-typeshed stubs package. non_bundled_packages = { "MySQLdb": "types-mysqlclient", "PIL": "types-Pillow",