Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (154 loc) · 4.28 KB
/
Copy pathpyproject.toml
File metadata and controls
179 lines (154 loc) · 4.28 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
[build-system]
requires = ["setuptools >= 82.0.1,< 84.3", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "modbus_local_gateway"
dynamic = ["version", "readme", "dependencies", "optional-dependencies"]
description = "Modbus Local Gateway is a module which allows integration with Modbus devices in Home Assistant."
requires-python = ">=3.14.2"
license = "MIT"
license-files = ["LICENSE.md"]
authors = [
{name = "Tim Laing"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries"
]
keywords = ["modbus", "local", "gateway", "homeassistant", "integration"]
[project.urls]
homepage = "https://github.com/timlaing/modbus_local_gateway"
download = "https://github.com/timlaing/modbus_local_gateway/releases/latest"
bug_tracker = "https://github.com/timlaing/modbus_local_gateway/issues"
repository = "https://github.com/timlaing/modbus_local_gateway"
[tool.setuptools_scm]
[tool.setuptools]
packages = [
"custom_components.modbus_local_gateway",
"custom_components.modbus_local_gateway.device_configs",
"custom_components.modbus_local_gateway.entity_management",
]
[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {dev = {file = ["requirements_dev.txt"]}}
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.14
target-version = "py314"
[tool.ruff.analyze]
preview=true
[tool.ruff.format]
preview=true
[tool.ruff.lint]
preview=true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"UP007", # use X | Y for union types (HA uses Optional in some places)
]
[tool.ruff.lint.isort]
known-first-party = ["custom_components"]
force-sort-within-sections=true
[tool.mypy]
python_version = "3.14"
explicit_package_bases = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
check_untyped_defs = true
exclude_gitignore = true
strict = true
show_error_codes = true
pretty = true
[tool.pylint.main]
jobs = 0
[tool.pylint."messages control"]
disable = [
"C0103", # invalid-name (HA uses short names for entity descriptions)
"R0801", # duplicate-code (structural patterns repeated across entity platforms)
"R0902", # too-many-instance-attributes (entity classes naturally have many attrs)
"R0903", # too-few-public-methods (entity classes are naturally small)
"R0904", # too-many-public-methods
"R0913", # too-many-arguments (HA callbacks have many args)
"R0917", # too-many-positional-arguments
"W0613", # unused-argument (HA callback signatures)
"E1101", # no-member (dynamic HA attributes)
]
[tool.pylint.format]
max-line-length = 88
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
norecursedirs = [".git", ".tox", "build", "lib"]
addopts = ["--disable-socket", "--allow-unix-socket", "--timeout=2"]
[tool.coverage.run]
branch = true
relative_files = true
source = ["custom_components/modbus_local_gateway"]
omit = [
"modbus_test_*/*",
"conftest.py",
]
[tool.coverage.paths]
source = [
"custom_components/",
"tests/"
]
[tool.pyright]
typeCheckingMode = "off"
[tool.tox]
requires = ["tox>=4.24.1"]
env_list = ["lint", "3.14"]
[tool.tox.env_run_base]
description = "Run test under {base_python}"
commands = [["pytest"]]
deps = ["-r requirements_dev.txt"]
[tool.tox.gh-actions]
python = '''
3.14: 3.14, lint
'''