From a49aa065b7b76e5bfd898412f1afdfca411e3e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 22 Dec 2021 22:21:05 +0200 Subject: [PATCH] Derive mypy python_version from REQUIRED_PYTHON_VER (#62616) --- script/hassfest/mypy_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/hassfest/mypy_config.py b/script/hassfest/mypy_config.py index 9878fb891e7..80e2022243d 100644 --- a/script/hassfest/mypy_config.py +++ b/script/hassfest/mypy_config.py @@ -7,6 +7,8 @@ import os from pathlib import Path from typing import Final +from homeassistant.const import REQUIRED_PYTHON_VER + from .model import Config, Integration # Modules which have type hints which known to be broken. @@ -143,7 +145,7 @@ HEADER: Final = """ """.lstrip() GENERAL_SETTINGS: Final[dict[str, str]] = { - "python_version": "3.8", + "python_version": ".".join(str(x) for x in REQUIRED_PYTHON_VER[:2]), "show_error_codes": "true", "follow_imports": "silent", # Enable some checks globally.