-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (116 loc) · 3.12 KB
/
Copy pathpyproject.toml
File metadata and controls
128 lines (116 loc) · 3.12 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[build-system]
requires = ["setuptools>=65.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "bodymiscale"
version = "2026.8.0"
description = "Home Assistant custom integration for body composition tracking"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.14"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.14",
"Topic :: Home Automation",
]
dependencies = ["homeassistant>=2026.5.0"]
[project.optional-dependencies]
dev = [
"mypy==2.3.0",
"pre-commit==4.6.1",
"pylint==4.0.6",
"pytest-cov",
"pytest-homeassistant-custom-component",
"ruff==0.16.1",
]
[tool.setuptools.packages.find]
include = ["custom_components*"]
exclude = ["tests*"]
# ============================================================
# RUFF CONFIGURATION
# ============================================================
[tool.ruff]
target-version = "py314"
line-length = 88
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "W", "D", "SIM", "C4", "PGH", "RUF", "BLE"]
ignore = [
"E501",
"D202",
"D107",
"RUF002", # Intentional unicode chars in scientific docstrings
"UP024",
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
# ============================================================
# MYPY CONFIGURATION
# ============================================================
[tool.mypy]
python_version = "3.14"
show_error_codes = true
follow_imports = "silent"
ignore_missing_imports = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_unreachable = true
# ============================================================
# PYTEST CONFIGURATION
# ============================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
pythonpath = ["."]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
addopts = "-rxf -x -v -l --tb=short --cov=./ --cov-report=xml"
# ============================================================
# COVERAGE CONFIGURATION
# ============================================================
[tool.coverage.run]
source = ["custom_components"]
omit = ["*/tests/*", "*/test_*"]
[tool.coverage.report]
skip_covered = true
show_missing = true
# ============================================================
# BANDIT CONFIGURATION
# ============================================================
[tool.bandit]
tests = [
"B103",
"B108",
"B306",
"B307",
"B313",
"B314",
"B315",
"B316",
"B317",
"B318",
"B319",
"B320",
"B601",
"B602",
"B604",
"B608",
"B609",
]
quiet = true
format = "custom"