-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
233 lines (213 loc) · 6.76 KB
/
pyproject.toml
File metadata and controls
233 lines (213 loc) · 6.76 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
[build-system]
requires = ["setuptools>=75.6.0"]
build-backend = "setuptools.build_meta"
[project]
name = "pydevccu"
version = "0.2.1"
license = {text = "MIT License"}
description = "Virtual HomeMatic CCU XML-RPC and JSON-RPC backend."
readme = "README.md"
authors = [
{name = "Daniel Perna", email = "danielperna84@gmail.com"},
{name = "SukramJ", email = "sukramj@icloud.com"},
]
keywords = ["homematic", "ccu", "xml-rpc", "json-rpc", "openccu"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Free Threading :: 2 - Beta",
"Framework :: AsyncIO",
"Topic :: Home Automation",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
requires-python = ">=3.13.0"
dependencies = ["aiohttp>=3.9.0"]
[project.optional-dependencies]
# orjson provides faster JSON serialization but does not support free-threaded Python.
# The compat module automatically falls back to stdlib json when orjson is unavailable.
fast = ["orjson>=3.11.0"]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=4.0.0",
]
[project.urls]
"Source Code" = "https://github.com/sukramj/pydevccu"
"Bug Reports" = "https://github.com/sukramj/pydevccu/issues"
"Changelog" = "https://github.com/sukramj/pydevccu/blob/master/changelog.txt"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["pydevccu*"]
exclude = ["tests", "tests.*", "dist", "build"]
[tool.setuptools.package-data]
pydevccu = ["py.typed", "*/*.json"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
log_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(name)s:%(filename)s:%(lineno)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
[tool.ruff]
target-version = "py313"
line-length = 120
lint.select = [
"A", # Variable shadowing Python builtin
"ASYNC", # Async checks
"B", # flake8-bugbear
"C", # complexity
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"FLY", # flynt
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
]
lint.ignore = [
"A005", # Module shadows standard-library module
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the second line
"D406", # Section name should end with a newline
"D407", # Section name underlining
"E501", # line too long
"E731", # do not assign a lambda expression
"N818", # Exception name should be named with an Error suffix
"PERF401", # Use list comprehension
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"PLW2901", # Outer variable overwritten by inner target
"PT011", # pytest.raises too broad
"PT012", # pytest.raises block should contain single statement
"PT018", # Assertion should be broken down
"RET503", # Missing explicit return
"RET504", # Unnecessary assignment before return
"RUF022", # __all__ not sorted
"S101", # Use of assert detected
"S104", # Possible binding to all interfaces
"S106", # Possible hardcoded password
"SIM115", # Use context handler for opening files
"TRY003", # Avoid specifying long messages outside exception class
"TRY300", # Consider moving to else block
"TRY301", # Abstract raise to inner function
"TRY400", # Use logging.exception instead of logging.error
# May conflict with formatter
"W191",
"COM812",
"COM819",
"ISC001",
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "TRY002", "S101"]
[tool.ruff.lint.isort]
force-sort-within-sections = true
required-imports = ["from __future__ import annotations"]
known-first-party = ["pydevccu"]
combine-as-imports = true
split-on-trailing-comma = false
[tool.ruff.lint.mccabe]
max-complexity = 25
[tool.coverage.run]
branch = true
source = ["pydevccu"]
omit = [
# Legacy code - excluded from coverage
"pydevccu/ccu.py",
"pydevccu/converter.py",
"pydevccu/proxy.py",
"pydevccu/device_logic/*",
]
parallel = true
concurrency = ["thread"]
[tool.coverage.report]
show_missing = true
skip_empty = true
skip_covered = false
sort = "cover"
precision = 2
fail_under = 65.0
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if False:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@overload",
"@abstractmethod",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.xml]
output = "coverage.xml"
[tool.mypy]
python_version = "3.13"
strict = true
show_error_codes = true
follow_imports = "normal"
local_partial_types = true
strict_equality = true
no_implicit_optional = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
exclude = "(?x)(^build/|^dist/|^htmlcov/|^.*\\.egg-info/|^venv/)"
enable_error_code = [
"ignore-without-code",
"redundant-self",
"truthy-iterable",
]
disable_error_code = [
"annotation-unchecked",
"import-not-found",
"import-untyped",
"no-untyped-call",
"no-any-return",
]
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