forked from DeebotUniverse/client.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
176 lines (143 loc) · 4.43 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
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
[build-system]
requires = ["setuptools>=60",
"setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "deebot-client"
license = {text = "GPL-3.0"}
description = "Deebot client library in python 3"
readme = "README.md"
authors = [
{name = "Robert Resch", email = "[email protected]"}
]
keywords = ["home", "automation", "homeassistant", "vacuum", "robot", "deebot", "ecovacs"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.12",
"Topic :: Home Automation",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.12.0"
dynamic = ["dependencies", "version"]
[project.urls]
"Homepage" = "https://deebot.readthedocs.io/"
"Source Code" = "https://github.com/DeebotUniverse/client.py"
"Bug Reports" = "https://github.com/DeebotUniverse/client.py/issues"
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
[tool.setuptools.packages.find]
include = ["deebot_client*"]
[tool.setuptools_scm]
[tool.black]
target-version = ['py311']
safe = true
[tool.ruff.lint]
select = [
"ALL",
]
ignore = [
"ANN101", # Self... explanatory
"ANN102", # Cls... explanatory
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"EM101", # raw-string-in-exception
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"E501", # line too long
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
# Conflicts with the Ruff formatter
"COM812",
"ISC001",
# Remove later
"TD", # Todos
"A", # bultins
"DTZ", # use tz need to test it first
"TRY", # tryceratops
"FIX002", # Line contains TODO, consider resolving the issue
"BLE001", # Do not catch blind exception: `Exception`
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-first-party = [
"deebot_client",
]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D100", # Missing docstring in public module
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"N802", # Function name {name} should be lowercase
"N816", # Variable {name} in global scope should not be mixedCase
"PLR0913", # Too many arguments in function definition
"S101", # Use of assert detected
"SLF001", # Private member accessed: {access}
"T201", # print found
]
"deebot_client/hardware/deebot/*" = [
"N999", # Invalid module name
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"svg.Path".msg = "Use map.Path instead"
[tool.ruff.lint.mccabe]
max-complexity = 12
[tool.ruff.lint.pylint]
max-args = 7
[tool.pylint.MAIN]
py-version = "3.12"
ignore = [
"tests",
]
fail-on = [
"I",
]
[tool.pylint.BASIC]
good-names= ["i","j","k","ex","_","T","x","y","id","tg"]
[tool.pylint."MESSAGES CONTROL"]
# Reasons disabled:
# format - handled by black
# duplicate-code - unavoidable
# cyclic-import - doesn't test if both import on load
# abstract-class-little-used - prevents from setting right foundation
# too-many-* - are not enforced for the sake of readability
# too-few-* - same as too-many-*
# abstract-method - with intro of async there are always methods missing
# inconsistent-return-statements - doesn't handle raise
# too-many-ancestors - it's too strict.
# wrong-import-order - isort guards this
# ---
# Pylint CodeStyle plugin
# consider-using-namedtuple-or-dataclass - too opinionated
# consider-using-assignment-expr - decision to use := better left to devs
disable = [
"format",
"cyclic-import",
"duplicate-code",
"too-many-arguments",
"too-many-instance-attributes",
"too-many-locals",
"too-many-ancestors",
"too-few-public-methods",
"invalid-name",
]
enable = [
"useless-suppression",
"use-symbolic-message-instead",
]
[tool.pylint.REPORTS]
score = false
[tool.pylint.FORMAT]
expected-line-ending-format = "LF"
[tool.pylint.EXCEPTIONS]
overgeneral-exceptions = [
"builtins.BaseException",
"builtins.Exception",
]