-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
71 lines (63 loc) · 1.97 KB
/
Copy pathpyproject.toml
File metadata and controls
71 lines (63 loc) · 1.97 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[tool.ruff]
line-length = 88
target-version = "py313"
src = ["custom_components", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"W", # pycodestyle warnings
"F", # pyflakes
"I", # import sorting
"UP", # pyupgrade
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"RUF", # ruff-specific
"ASYNC", # async correctness
"D", # docstrings
"T20", # no stray print()
]
ignore = [
"D203", # conflicts with D211
"D213", # conflicts with D212
"E501", # line length is the formatter's job
]
[tool.ruff.lint.per-file-ignores]
# Tests read better with plain asserts, long fixture literals and private
# access into the object under test.
"tests/*" = ["D100", "D103", "SIM117"]
"scripts/*" = ["D", "T20"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.mypy]
# The current test lane's interpreter. Home Assistant's own annotations use
# syntax the older mode cannot parse, so typing runs on the newer one while
# the code itself still has to work on the supported floor - which is what
# ruff's target-version keeps honest.
python_version = "3.14"
strict = true
packages = ["custom_components.boilerjuice"]
# Home Assistant ships py.typed but its own annotations are not complete
# enough for a downstream strict run; these are the seams where that shows.
disallow_untyped_decorators = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = ["bs4.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# Set explicitly rather than left to the default, which pytest-asyncio warns
# about on the minimum lane. Every test gets its own loop.
asyncio_default_fixture_loop_scope = "function"
addopts = "-p no:randomly"
[tool.coverage.run]
source = ["custom_components/boilerjuice"]
branch = false
[tool.coverage.report]
show_missing = true
fail_under = 95
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
]