-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
194 lines (180 loc) · 5.17 KB
/
Copy pathpyproject.toml
File metadata and controls
194 lines (180 loc) · 5.17 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "vrmapi-async"
version = "0.1.0"
description = "A modern, async Python client for the Victron VRM API."
readme = "README.md"
requires-python = ">3.9.1,<4"
license = { file = "LICENSE" }
authors = [
{ name="Tomáš Sandrini", email="t@tsandrini.sh" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: EUPL-1.2 license",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Framework :: AsyncIO",
]
dependencies = [
"httpx>=0.27.0",
"pydantic>=2.7.0",
]
[project.urls]
"Homepage" = "https://github.com/tsandrini/vrmapi-async"
"Repository" = "https://github.com/tsandrini/vrmapi-async"
"Documentation" = "https://tsandrini.github.io/vrmapi-async/"
[project.optional-dependencies]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"respx>=0.21.0",
]
dev = [
"ruff>=0.4.0",
"vrmapi-async[test]",
"vrmapi-async[docs]",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.27.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.0",
]
[tool.setuptools.packages.find]
include = ["vrmapi_async*"]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
testpaths = [
"tests",
]
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "$version"
version_scheme = "pep440"
version_provider = "uv"
update_changelog_on_bump = true
major_version_zero = true
[dependency-groups]
dev = [
"ipython>=8.18.1",
"ruff>=0.4.0",
{include-group = "test"},
{include-group = "docs"},
]
test = [
"pytest>=8.3.5",
"pytest-asyncio>=0.23.0",
"respx>=0.22.0",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.27.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.0",
]
[tool.mypy]
strict = true
ignore_missing_imports = true
allow_subclassing_any = true
allow_untyped_calls = true
pretty = true
show_error_codes = true
implicit_reexport = true
allow_untyped_decorators = true
warn_unused_ignores = true
warn_return_any = false
namespace_packages = true
disallow_any_explicit = false
warn_unreachable = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false
warn_unreachable = false
[tool.ruff]
# List of enabled rulsets.
# See https://docs.astral.sh/ruff/rules/ for more information.
lint.select = [
"A", # Prevent builtins shadowing
"E", # Error
"F", # Pyflakes
"W", # Pycodestyle
"C90", # McCabe complexity
"I", # Isort
"N", # pep8-naming
"D", # Pydocstyle
"ANN", # Pytype annotations
"S", # Bandit
"B", # Bugbear
"COM", # Commas
"C4", # Comprehensions
"ISC", # Implicit string concat
"PIE", # Unnecessary code
"T20", # Catch prints
"PYI", # validate pyi files
"Q", # Checks for quotes
"RSE", # Checks raise statements
"RET", # Checks return statements
"SLF", # Self checks
"SIM", # Simplificator
"PTH", # Pathlib checks
"ERA", # Checks for commented out code
"PL", # PyLint checks
"RUF", # Specific to Ruff checks
"ICN", # Import conventions
"DTZ", # Datetime zone
"LOG", # Logging
"G", # Logging format
"TID", # Tidy imports
"TD", # todos formatting
"ARG", # Unused arguments
"UP", # Pyupgrade
"BLE", # Do not catch blind exceptions
]
lint.ignore = [
"ERA001", # Commented out code
"PLR0913", # Too many arguments for function call
"TD003", # Missing issue link for this TODO
"COM812", # Trailing comma missing — conflicts with ruff-format
"ANN401", # typing.Any disallowed — needed for Pydantic validators/response models
"RUF012", # Mutable ClassVar — false positive on Pydantic field declarations
]
lint.mccabe = { max-complexity = 10 }
exclude = [
".venv/",
]
target-version = "py310"
line-length = 88
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Use of assert detected
"S105", # Possible hardcoded password in variable (test fixtures)
"S106", # Possible hardcoded password (test fixtures)
"ARG001", # Unused function argument (pytest fixtures)
"ARG002", # Unused method argument (pytest fixtures)
"SLF001", # Private member access (testing internals)
"ANN", # Type annotations not required in tests
"D100", # Missing module docstring
"D101", # Missing class docstring
"D102", # Missing method docstring
"D103", # Missing function docstring
"D104", # Missing package docstring
"D107", # Missing __init__ docstring
"DTZ001", # Naive datetimes are intentional in tests
"RUF001", # Ambiguous unicode characters (intentional test data)
"RUF046", # Unnecessary int cast (explicit in test assertions)
"PLC0415", # Inline imports acceptable in tests
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["typing.overload"]
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int", "str", "float", "bytes"]