-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
47 lines (39 loc) · 1.72 KB
/
Copy pathpyproject.toml
File metadata and controls
47 lines (39 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[tool.ruff]
# 100 rather than Home Assistant core's 88: a deliberate config choice, not a
# quality one. It keeps this change about wiring up CI instead of reflowing
# working lines, while still catching genuinely long ones.
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.ruff.lint.isort]
known-first-party = ["cellar_tracker", "conftest"]
[tool.mypy]
# 3.13 because that is what Home Assistant 2026.2 requires; the runtime matrix
# in CI still covers 3.12 as well.
python_version = "3.13"
# custom_components so that `cellar_tracker` resolves as a top-level package,
# stubs/ for the one dependency that ships no types of its own.
mypy_path = ["custom_components", "stubs"]
files = ["custom_components/cellar_tracker", "tests/typing_gate.py"]
# No ignore_missing_imports. Home Assistant is installed for this job
# (requirements_mypy.txt) precisely so that it is not waved through: an
# unresolved `homeassistant.*` makes DataUpdateCoordinator `Any`, a class
# deriving from `Any` inherits `Any` for everything it does not declare, and
# `coordinator.data` is then unchecked at every call site - the generic
# parameter reduced to decoration. tests/typing_gate.py asserts, in the
# checker's own terms, that this has not happened.
disallow_any_unimported = true
warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
no_implicit_optional = true
strict_equality = true
# The point of the exercise: nothing in this integration may be implicitly Any,
# and every function must declare what it returns.
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true