Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
62 lines (56 loc) · 1.74 KB
/
Copy pathpyproject.toml
File metadata and controls
62 lines (56 loc) · 1.74 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
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E501", "F401"]
[tool.mypy]
python_version = "3.12"
# tools/ and legacy/ hold reverse-engineering artifacts and vendor dumps, not
# integration code -- tools/ alone contains a full Dart SDK whose own build.py
# collides with the real one and aborts the run before anything is checked.
exclude = ["^tools/", "^legacy/"]
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"paho.mqtt.*",
"crcmod.*",
"homeassistant.*",
# ``custom_components`` exists only while pytest runs: tests/conftest.py
# synthesises it so the root, which is itself the package, can be imported
# under a parent named custom_components.lumentree. mypy never executes that
# file, so it cannot resolve the name -- but the modules behind it are
# checked anyway, under their real paths.
"custom_components.*",
"pytest_homeassistant_custom_component.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]