-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
314 lines (294 loc) · 10.2 KB
/
pyproject.toml
File metadata and controls
314 lines (294 loc) · 10.2 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=77", "setuptools_scm>=8"]
[project]
authors = [
{name = "CONTACT Software GmbH", email = "[email protected]"},
{name = "Frank Patz-Brockmann", email = "[email protected]"}
]
classifiers = [
"Environment :: Console",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development"
]
dependencies = [
"click~=8.1.8",
"distro~=1.9.0",
"packaging~=25.0",
"path~=17.0.0",
"pip>=22.0",
"platformdirs~=4.3.8",
"ruamel.yaml~=0.18.10"
]
description = "Spin is a task runner that aims to solve the problems of provisioning development environments and standardizing workflows."
dynamic = ["version", "readme"]
license = "Apache-2.0"
license-files = ["LICENSE"]
maintainers = [
{name = "Waleri Enns", email = "[email protected]"},
{name = "Benjamin Thomas Schwertfeger", email = "[email protected]"},
{name = "Fabian Hafer", email = "[email protected]"}
]
name = "csspin"
requires-python = ">=3.10"
[project.scripts]
spin = "csspin:_main"
[project.urls]
"CONTACT Software GmbH" = "https://contact-software.com"
Documentation = "https://csspin.readthedocs.io/en/stable/"
"Issue Tracker" = "https://github.com/cslab/csspin/issues"
"Release Notes" = "https://csspin.readthedocs.io/en/stable/relnotes.html"
Repository = "https://github.com/cslab/csspin"
[tool.black]
enable-unstable-feature = ["string_processing"]
line-length = 88
preview = true
target-version = ['py39']
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:"]
omit = ["/tmp/**/*.py"]
precision = 2
[tool.coverage.run]
omit = ["/tmp/**/*.py"]
parallel = true
relative_files = true
source_pkgs = ["csspin"]
[tool.isort]
multi_line_output = 3
profile = "black"
[tool.mypy]
# ===== Untyped definitions and calls
#
check_untyped_defs = true
color_output = true
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_expr = false
disallow_any_generics = false
# ===== Disallow dynamic typing
#
disallow_any_unimported = false
disallow_incomplete_defs = true
disallow_subclassing_any = false
disallow_untyped_calls = true
disallow_untyped_decorators = false # since click's decorators are untyped
disallow_untyped_defs = true
error_summary = true
files = ["*.py"]
hide_error_codes = false
# ===== Suppressing errors
#
ignore_errors = false
ignore_missing_imports = false
# ===== None and Optional handling
#
implicit_optional = false
pretty = true
python_version = "3.10"
show_absolute_path = true
show_column_numbers = true
# ===== Configuring error messages
#
show_error_context = true
strict_optional = true
warn_no_return = true
# ===== Configuring warnings
#
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pylint.design]
# CON: raised some limits, which would otherwise generate
# too many issues on our code bases
#
# Maximum number of arguments for function / method.
# CON: original value: 7
max-args = 9
# Maximum number of attributes for a class (see R0902).
# CON: original value: 7
max-attributes = 12
# Maximum number of boolean expressions in an if statement (see R0916).
# CON: original value: 5
max-bool-expr = 7
# Maximum number of branch for function / method body.
# CON: original value: 12
max-branches = 20
# Maximum number of locals for function / method body.
# CON: original value: 15
max-locals = 20
# Maximum number of statements in function / method body.
# CON: original value: 50
max-statements = 75
[tool.pylint.format]
# Maximum number of characters on a single line.
# CON: the current consensus (original value 100)
max-line-length = 110
# Maximum number of lines in a module (original value 1000)
max-module-lines = 1100
[tool.pylint.imports]
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules = ["regsub", "TERMIOS", "Bastion", "rexec", "cgi"]
[tool.pylint.main]
# Files or directories to be skipped. They should be base names, not paths.
# CON: exclude the usual candidates
ignore = [".svn", "node_modules", ".git", "build"]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
# CON: 0 to use all available cores (it actually works and scales quite good).
jobs = 0
[tool.pylint.messages_control]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
# CON: excluding INFERENCE_FAILURE to decrease the number of false positives
confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "UNDEFINED"]
# CON: We disable lots of rules to make Pylint less verbose and
# actually usable. We do it for different reasons. First, we dont
# check code formatting: nowadays, this is the job of
# auto-formatters (black in this case). Second, there are some
# informational rules which can be useful for setup debugging but
# aren't useful day-to-day. Third, some rules are just bad/too
# rigid/raise too many false positives.
#
# ** Setup debugging **
# (I0011) locally-disabled
# (I0013) file-ignored
# (I0020) suppressed-message
# (I0021) useless-suppression
# (I0022) deprecated-pragma
# (I0023) use-symbolic-message-instead
# (I1101) c-extension-no-member: generates too many false positives, since we cannot load all c-extensions of external modules
#
# ** Bad/Too rigid/Generates too many false positives **
# (C0103) invalid-name
# (C0111) missing-docstring: to much noise
# (C0112) empty-docstring: raises false positives on the shebang line :(
# (C0303) trailing-whitespace: pre-commit
# (C0325) superfluous-parens: Creates a huge number of issues on our code base (11.2017: > 4K)
# (C0401) wrong-spelling-in-comment
# (C0402) wrong-spelling-in-docstring
# (C0403) invalid-characters-in-docstring
# (C0415) import-outside-toplevel: too restricting
#
# (W0201) attribute-defined-outside-init: doesn't fit well with our ORM code.
# (W0107) unnecessary-pass: too many false positives
# (W1113) keyword-arg-before-vararg: false positives only
# (W0123) eval-used: irrelevant
# (W0246) useless-parent-delegation: when the child calls a parent function with the same name.
# (W1402) anomalous-unicode-escape-in-string: false positives only
# (W0613) unused-argument: too many false positives
# (W0621) redefined-outer-name: not of much use, false positives when called function defines same variables as caller function
#
# (E0611) no-name-in-module: 100 percent false positives so far
# (E0102) function-redefined: doesn't understand '@classbody' and 'Forward'
# (E0203) access-member-before-definition: doesn't understand the magic used in our ORM code
# (E0213) no-self-argument: conflicts with the pattern used in the StateChange-Classes
# (E0401) import-error:
# (E0632) unbalanced-tuple-unpacking: false positives only
# (E1003) bad-super-call: doesn't understand the Forward(class)-semantics, which are used extensively in our code base.
# (E1101) no-member: generates lots of false positives in the ORM code.
# (E1136) unsubscriptable-object: requires precise type inference, which doesnt always work
#
# (R0903) too-few-public-methods: don't care most of the time...
# (R0904) too-many-public-methods: fires on everything derived from cdb.objects.Object
# (R1705) no-else-return: is allowed by PEP8 and is too rigid
# (R1710) inconsistent-return-statements: prevents writing of compact code
#
# ** Not PyLints job **
# (C0301) line-too-long: black
# (C0304) missing-final-newline: black
# (C0305) trailing-newlines: black
# (W0311) bad-indentation: black
# (C0327) mixed-line-endings: black
# (C0410) multiple-imports: isort
# (C0411) wrong-import-order: isort
# (C0412) ungrouped-imports: isort
# (C0413) wrong-import-position: isort
#
# ** Local modifications **
# (W1203) logging-fstring-interpolation: "code consistency" > "potential, minimal performance drop"
disable = [
"access-member-before-definition",
"anomalous-unicode-escape-in-string",
"attribute-defined-outside-init",
"bad-indentation",
"bad-super-call",
"c-extension-no-member",
"deprecated-pragma",
"empty-docstring",
"eval-used",
"file-ignored",
"function-redefined",
"import-error",
"import-outside-toplevel",
"inconsistent-return-statements",
"invalid-characters-in-docstring",
"invalid-name",
"keyword-arg-before-vararg",
"line-too-long",
"locally-disabled",
"logging-fstring-interpolation",
"missing-docstring",
"missing-final-newline",
"mixed-line-endings",
"multiple-imports",
"no-else-return",
"no-member",
"no-name-in-module",
"no-self-argument",
"redefined-outer-name",
"superfluous-parens",
"suppressed-message",
"too-few-public-methods",
"too-many-public-methods",
"trailing-newlines",
"trailing-whitespace",
"unbalanced-tuple-unpacking",
"ungrouped-imports",
"unidiomatic-typecheck",
"unnecessary-pass",
"unsubscriptable-object",
"unused-argument",
"useless-parent-delegation",
"useless-suppression",
"use-symbolic-message-instead",
"wrong-import-order",
"wrong-import-position",
"wrong-spelling-in-comment",
"wrong-spelling-in-docstring"
]
[tool.pylint.miscellaneous]
# List of note tags to take in consideration, separated by a comma.
# CON: added some more
notes = ["FIXME", "XXX", "TODO", "TBC", "TBD"]
[tool.pylint.reports]
# Activate the evaluation score.
# CON: to make the output more concise
score = "no"
[tool.pylint.variables]
# List of names allowed to shadow builtins
# CON: the identifier 'id' is used too often in our sources
allowed-redefined-builtins = "id"
[tool.pytest.ini_options]
addopts = "--strict-markers"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"wip: marks tests as work in progress (should not end up in vsc)"
]
[tool.setuptools.dynamic]
readme = {file = "README.rst", content-type = "text/x-rst"}
[tool.setuptools.packages.find]
namespaces = false
where = ["src"]
[tool.setuptools_scm]
local_scheme = "no-local-version"