-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
221 lines (204 loc) · 6.81 KB
/
pyproject.toml
File metadata and controls
221 lines (204 loc) · 6.81 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
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=77", "setuptools_scm>=8"]
[project]
authors = [
{name = "CONTACT Software GmbH", email = "info@contact-software.com"}
]
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 = [
# TODO: Remove the platformdirs dependency as soon as we found a solution to
# the problem of plugin-package dependencies conflicting with csspin
# dependencies.
"platformdirs~=4.3.8",
"virtualenv"
]
description = "Plugin-package for csspin providing Python related plugins"
dynamic = ["version", "readme"]
license = "Apache-2.0"
license-files = ["LICENSE"]
maintainers = [
{name = "Waleri Enns", email = "waleri.enns@contact-software.com"},
{name = "Benjamin Thomas Schwertfeger", email = "benjaminthomas.schwertfeger@contact-software.com"},
{name = "Fabian Hafer", email = "fabian.hafer@contact-software.com"}
]
name = "csspin-python"
requires-python = ">=3.10"
[project.optional-dependencies]
aws_auth = ["csaccess>=0.1.0"]
uv = [
"tomli;python_version<'3.11'", # From 3.11 on tomllib can be used
"tomli-w", # For writing the uv.toml
"uv"
]
[project.urls]
"CONTACT Software GmbH" = "https://contact-software.com"
Documentation = "https://csspin-python.readthedocs.io/en/stable/"
"Issue Tracker" = "https://github.com/cslab/csspin-python/issues"
"Release Notes" = "https://csspin-python.readthedocs.io/en/stable/relnotes.html"
Repository = "https://github.com/cslab/csspin-python"
[tool.coverage.report]
include = ["src/csspin_python/*"]
precision = 2
[tool.coverage.run]
parallel = true
relative_files = true
[tool.isort]
# The profile must be 'black', to avoid conflicting reordering caused by
# isort and black sorting at the same time.
known_first_party = ["cs", "cdb*"]
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 = true # TODO: Should be false but need csspin stubs:
# ===== 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.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", "pytest.py"]
# 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 don't
# 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: too restricting
# (C0303) trailing-whitespace: pre-commit
# (C0415) import-outside-toplevel: too restricting
# (E0401) import-error: pylint would need access to all third-party packages
# (R1705) no-else-return: is allowed by PEP8 and is too rigid
#
# ** 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 = [
"bad-indentation",
"c-extension-no-member",
"deprecated-pragma",
"file-ignored",
"import-error",
"invalid-name",
"import-outside-toplevel",
"line-too-long",
"locally-disabled",
"logging-fstring-interpolation",
"missing-final-newline",
"mixed-line-endings",
"multiple-imports",
"no-else-return",
"suppressed-message",
"trailing-newlines",
"trailing-whitespace",
"ungrouped-imports",
"unidiomatic-typecheck",
"useless-suppression",
"use-symbolic-message-instead",
"wrong-import-order",
"wrong-import-position",
"duplicate-code"
]
[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.pytest.ini_options]
markers = ["acceptance", "integration", "wip"]
[tool.setuptools.dynamic]
readme = {file = "README.rst", content-type = "text/x-rst"}
[tool.setuptools.package-data]
csspin_python = ["*_schema.yaml"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
local_scheme = "no-local-version"