forked from bramstroker/homeassistant-powercalc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (111 loc) · 3.08 KB
/
pyproject.toml
File metadata and controls
127 lines (111 loc) · 3.08 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
[project]
name = "Powercalc"
version = "0.1.0"
description = "Custom Home Assistant component for virtual power sensors"
maintainers = [
{ name = "Bram Gerritsen", email = "bgerritsen@gmail.com" },
]
keywords = [
"homeassistant",
"energy",
"power",
"custom-component",
"custom-integration",
]
classifiers = [
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.13.2,<4.0"
dependencies = ["homeassistant"]
license = "MIT"
[tool.pytest.ini_options]
testpaths = "tests"
norecursedirs = ".git"
asyncio_mode = "auto"
markers = [
"skip_remote_loader_mocking: Do not mock globally registered remote loader mock",
]
log_level = "DEBUG"
asyncio_default_fixture_loop_scope = "function"
[tool.ruff.lint.isort]
known-first-party = ["custom_components", "powercalc"]
known-third-party = ["homeassistant"]
force-sort-within-sections = true
combine-as-imports = true
[tool.mypy]
python_version = "3.14"
show_error_codes = true
follow_imports = "silent"
local_partial_types = true
strict_equality = true
no_implicit_optional = false
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
warn_return_any = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = "homeassistant.components.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "custom_components.powercalc.config_flow"
disable_error_code = "return-value"
[tool.coverage.paths]
source = ["custom_components/powercalc", "utils", "tests"]
[tool.ruff]
line-length = 150
target-version = "py314"
exclude = ["utils/measure/playground", "utils/visualize", ".github", "docs"]
[tool.ruff.lint]
select = ["A", "ANN", "ASYNC", "B", "BLE", "C", "C4", "COM", "E", "F", "FIX", "FURB", "G", "ICN", "I", "INP", "ISC", "LOG", "N", "NPY", "PERF", "PIE", "PYI", "Q", "RET", "RUF", "S", "SIM", "SLF", "SLOT", "T10", "T20", "TID", "UP", "W"]
ignore = ["S101"]
[tool.ruff.lint.per-file-ignores]
"utils/measure/**.py" = ["T201"]
"tests/**.py" = ["ASYNC230"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.uv]
prerelease = "allow"
override-dependencies = [
"mashumaro[msgpack]==3.17",
]
[project.optional-dependencies]
docs = [
"zensical"
]
dev = [
"pre-commit>=4.0.0",
"ruff>=0.13.0",
"mypy==1.19.1",
"voluptuous-stubs>=0.1",
"homeassistant-stubs",
"pytest-homeassistant-custom-component==0.13.305",
"types-pytz>=2024.1",
"types-croniter>=2.0",
"croniter>=6.0.0",
"aioresponses>=0.7.6",
"pyturbojpeg>=1.8.2"
]
[tool.setuptools]
packages = ["custom_components"]
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[dependency-groups]
docs = [
"zensical>=0.0.5",
]
[tool.codespell]
ignore-words-list = 'hass'
check-filenames = true
skip = '*/translations/*.json,*/package-lock.json,*/model.json,*/library.json'