Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
48 lines (43 loc) · 1.95 KB
/
Copy pathpyproject.toml
File metadata and controls
48 lines (43 loc) · 1.95 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
48
[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
"integration: test exercises an external surface (HA core or mock_graphql). Auto-applied by conftest.pytest_collection_modifyitems based on imports/fixtures.",
]
[tool.coverage.run]
branch = true
source = ["custom_components/securitas"]
parallel = true
# Distinct data file per worker/job so `coverage combine` can merge unit + integration runs.
data_file = ".coverage"
[tool.coverage.report]
# fail_under intentionally NOT set here — applied by the CI `coverage-gate` job
# via `coverage report --fail-under=90` after combining unit + integration runs.
# Setting it here would cause individual subset runs (local or per-CI-job) to
# trip the gate before the combine step.
show_missing = true
skip_covered = false
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@(abc\\.)?abstractmethod",
]
[tool.ruff]
# docs/ is prose: ruff 0.16 began formatting Python fenced in Markdown, which
# only reflows the illustrative snippets there — not something we want ruff to
# police. Its job here is the package and its tests.
exclude = [".claude", "docs"]
target-version = "py313"
[tool.ruff.lint]
# Enforce an explicit rule set rather than ruff's defaults, which shift between
# releases: 0.16.0 expanded the defaults and reddened this job on an untouched
# tree. Pinning the rules we enforce (not the ruff version) lets CI install the
# latest ruff and still stay green. This set mirrors the sibling integrations.
select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF"]
# Line width is left to `ruff format`; E501 would otherwise only fire on long
# string literals and comments the formatter deliberately leaves intact.
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
# Test fixtures legitimately carry mutable class attributes (RUF012) and assert
# that mutation raises *any* exception (B017) — both are noise in test code.
"tests/**/*.py" = ["RUF012", "B017"]