mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: type-check against python 3.14, as the runner does (#42)
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
This commit is contained in:
+5
-1
@@ -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 —
|
||||
|
||||
Reference in New Issue
Block a user