-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
123 lines (103 loc) · 3.06 KB
/
pyproject.toml
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
[project]
name = "huawei-solar"
description = "A Python wrapper for the Huawei Inverter modbus TCP API"
readme = "README.md"
authors = [
{ name = "Emil Vanherp", email = "[email protected]" },
{ name = "Thijs Walcarius" },
]
license = { file="LICENSE.md" }
keywords = ["huawei", "solar", "sun2000", "inverter", "battery", "modbus", "modbus-tcp", "modbus-rtu"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Topic :: Home Automation",
"Operating System :: OS Independent",
]
dynamic = ["version"]
requires-python = ">= 3.11"
dependencies = [
"pymodbus>=3.6.9,<3.7",
"pyserial-asyncio>=0.6",
"typing-extensions>=4.12.2",
"backoff",
"pytz",
]
[project.urls]
Homepage = "https://gitlab.com/EmilV2/huawei-solar"
[project.optional-dependencies]
dev = [
"ruff", # Code linter and formatter
"tox>=4.15",
]
test = [
"pytest",
"pytest-asyncio",
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
path = "src/huawei_solar/version.py"
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # bugbear
"C", # complexity
"COM", # flake8-commas
"C4", # flake8-comprehensions
"D", # docstrings
"DTZ003", # Use datetime.now(tz=) instead of datetime.utcnow()
"DTZ004", # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
"E", # pycodestyle
"F", # pyflakes/autoflake
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"S", # flake8-bandit
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops,
"T20", # flake8-print
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"S101", # allow asserts
"TRY003", # allow exceptions with longer messages.
]
pylint.max-args = 6
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D",
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debatable
"PLR2004", # Magic value used in comparison, ...
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]