From 7e27bc792262413fdbd60d081446496388aa6562 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 30 Aug 2026 22:05:33 +0300 Subject: [PATCH] fix: type-check against python 3.14, as the runner does (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new typing step failed on its first CI run — not on our code: mypy parses the sources of the installed homeassistant, and after #392 that is HA 2026.8.3 on python 3.14, which uses 3.14-only syntax (parenthesis-free `except`). With python_version = 3.13 mypy stopped at a syntax error in someone else's file before reaching a single module of ours, which is exactly the silent-nothing the gate exists to prevent — except loud. ruff keeps target-version py313 deliberately: it lints OUR sources and a lower target only withholds newer-syntax suggestions, while mypy has to read the dependency tree the runner actually installs. User-Visible: no Issue: #42 --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19ee8662..745ddc87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,11 @@ select = ["E", "F", "B", "I"] ignore = ["E501"] [tool.mypy] -python_version = "3.13" +# 3.14, как и раннер после #392: mypy разбирает исходники установленного +# homeassistant, а тот уже написан на синтаксисе 3.14 (`except` без скобок) — +# на более низком python_version проверка падает синтаксической ошибкой в +# чужом файле, не дойдя до наших модулей. +python_version = "3.14" explicit_package_bases = true mypy_path = "." # Strict is opt-in per module (#42): the allowlist below only ever GROWS —