From bb4a36c8772ba139a26714ce13d5be29118b8921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 16 Aug 2021 23:47:37 +0300 Subject: [PATCH] Upgrade mypy to 0.910 and types-* (#54574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniel Hjelseth Høyer --- requirements_test.txt | 33 ++++++++++++++++++--------------- script/hassfest/mypy_config.py | 4 +++- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index d843745cbbf..63e102ec77e 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,13 +2,16 @@ # make new things fail. Manually update these pins when pulling in a # new version +# types-* that have versions roughly corresponding to the packages they +# contain hints for available should be kept in sync with them + -c homeassistant/package_constraints.txt -r requirements_test_pre_commit.txt codecov==2.1.12 coverage==5.5 jsonpickle==1.4.1 mock-open==1.4.0 -mypy==0.902 +mypy==0.910 pre-commit==2.14.0 pylint==2.9.5 pipdeptree==1.0.0 @@ -25,19 +28,19 @@ responses==0.12.0 respx==0.17.0 stdlib-list==0.7.0 tqdm==4.49.0 -types-backports==0.1.2 -types-certifi==0.1.3 -types-chardet==0.1.2 +types-backports==0.1.3 +types-certifi==0.1.4 +types-chardet==0.1.5 types-cryptography==3.3.2 -types-decorator==0.1.4 -types-emoji==1.2.1 -types-enum34==0.1.5 -types-ipaddress==0.1.2 +types-decorator==0.1.7 +types-emoji==1.2.4 +types-enum34==0.1.8 +types-ipaddress==0.1.5 types-jwt==0.1.3 -types-pkg-resources==0.1.2 -types-python-slugify==0.1.0 -types-pytz==0.1.1 -types-PyYAML==5.4.1 -types-requests==0.1.11 -types-toml==0.1.2 -types-ujson==0.1.0 +types-pkg-resources==0.1.3 +types-python-slugify==0.1.2 +types-pytz==2021.1.2 +types-PyYAML==5.4.6 +types-requests==2.25.1 +types-toml==0.1.5 +types-ujson==0.1.1 diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 1b24a935084..a69a9ec8d88 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -195,7 +195,9 @@ GENERAL_SETTINGS: Final[dict[str, str]] = { } # This is basically the list of checks which is enabled for "strict=true". -# But "strict=true" is applied globally, so we need to list all checks manually. +# "strict=false" in config files does not turn strict settings off if they've been +# set in a more general section (it instead means as if strict was not specified at +# all), so we need to list all checks manually to be able to flip them wholesale. STRICT_SETTINGS: Final[list[str]] = [ "check_untyped_defs", "disallow_incomplete_defs",