-
-
Notifications
You must be signed in to change notification settings - Fork 89
/
pyproject.toml
346 lines (312 loc) · 7.33 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
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
[project]
name = "pikaur"
version = '1.32'
description = 'AUR helper with minimal dependencies'
authors = [
{name = 'Yauhen Kirylau', email = '[email protected]'},
]
requires-python = ">=3.12"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Information Technology',
'Intended Audience :: Other Audience',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.11',
'Topic :: Software Development :: Build Tools',
'Topic :: System :: Archiving :: Packaging',
'Topic :: System :: Installation/Setup',
'Topic :: Utilities',
]
dependencies = [
"pyalpm"
]
keywords = ["arch", "linux", "aur", "helper"]
readme = "README.md"
[project.urls]
repository = 'https://github.com/actionless/pikaur'
[project.scripts]
pikaur = "pikaur.main:main"
pikasay = "pikaur.pikasay:pikasay_cli"
[tool.setuptools.packages.find]
include = ["pikaur"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.bandit]
exclude_dirs = ["./dumpster/", "./maintenance_scripts/", "./pikaur_meta_helpers/"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
show_error_codes = true
extra_checks = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
mypy_path = './maintenance_scripts/mypy_stubs'
[tool.ruff]
line-length = 100
unsafe-fixes = true
[tool.ruff.lint.mccabe]
max-complexity = 19
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
select = [
"F",
"E", "W",
"C90",
"I",
"N",
"D",
#"DOC", pydoclint
"UP",
"YTT",
"ANN",
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
#"CPY", # copyrights
"C4",
"DTZ",
"T10",
#"DJ", # django
#"FAST", # fastapi
"EM",
"EXE",
"FA",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"T20",
"PYI",
#"PT", # pytest
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TC",
"INT",
"ARG",
"PTH",
"TD",
"FIX",
"ERA",
#"PD", # pandas
"PGH",
"PL",
"TRY",
"FLY",
#"NPY", # numpy
"AIR",
"PERF",
"FURB",
"LOG",
"RUF",
]
ignore = [
# enable back later:
"ERA001", # commented out code
# already managed by pylint, mb replace completely to ruff later:
"PLR0904", # too-many-public-methods
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR0917", # too-many-positional-arguments
"PLR1702", # too-many-nested-blocks
"PLE1205", # pikaur is using non-default `logging`
"ANN401", # disable Any
"BLE001", # disallow catching Exception
"UP036", # remove code with py version checks
# docstrings
"D100",
"D101",
"D102",
"D103",
#
"D105",
"D107",
"D203", # conflicts with D211
"D205",
"D212", # conflicts with D213
"D400",
"D401", # idk, it seems broken? pydocstyle.org is down so i can't check how it's supposed to work
"D415",
#"Q000", # force double-quotes
]
[tool.ruff.lint.per-file-ignores]
"pikaur/argparse_extras.py" = [
"PLR0912",
"PLR0915",
"SLF001",
]
"pikaur_test/*.py" = [
"SLF001",
"S404",
]
"pikaur_test/test_*.py" = [
"ANN201",
"ANN206",
"PLR2004",
"PLR6301",
"PLC0415",
"T201",
]
"maintenance_scripts/*.py" = [
"INP001",
"S301",
"S403",
"S404",
"T201",
"T203",
]
"pikaur_meta_helpers/*.py" = [
"INP001",
"S301",
"S403",
"S404",
"T201",
"T203",
]
"maintenance_scripts/pikaman.py" = [
"ARG002",
"PLR6301",
"PLR0904",
]
"maintenance_scripts/vulture_whitelist.py" = [
"B018",
"SLF001",
]
"packaging/usr/bin/pikaur" = [
"T201",
]
"pypyalpm.py" = [
"T201",
"PTH107",
"PTH112",
"PTH118",
]
"pacman_fallback.py" = [
"T201",
"PTH107",
"PTH112",
"PTH118",
]
[tool.pylint.MASTER]
jobs = '0'
extension-pkg-whitelist = 'pyalpm'
ignore = 'CVS,ignoreme.py'
ignore-patterns = ''
persistent = 'yes'
unsafe-load-any-extension = 'no'
load-plugins = 'pylint.extensions.docparams,'
[tool.pylint.PARAMETER_DOCUMENTATION]
accept-no-param-doc = 'no'
accept-no-raise-doc = 'no'
accept-no-return-doc = 'no'
accept-no-yields-doc = 'no'
[tool.pylint.'MESSAGES CONTROL']
confidence = ''
disable = 'too-few-public-methods,missing-docstring,duplicate-code,missing-return-doc,missing-param-doc,missing-yield-doc,missing-raises-doc,,too-many-nested-blocks,too-many-public-methods,too-many-arguments,too-many-locals,import-outside-toplevel'
enable = 'useless-suppression'
[tool.pylint.REPORTS]
evaluation = '10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)'
output-format = 'text'
reports = 'no'
score = 'yes'
[tool.pylint.REFACTORING]
max-nested-blocks = '5'
[tool.pylint.FORMAT]
expected-line-ending-format = 'LF'
ignore-long-lines = '^\s*(# )?<?https?://\S+>?$'
indent-after-paren = '4'
indent-string = ' '
max-line-length = '100'
max-module-lines = '1000'
single-line-if-stmt = 'no'
[tool.pylint.TYPECHECK]
contextmanager-decorators = 'contextlib.contextmanager'
generated-members = 'self.props'
ignored-classes = 'optparse.Values,thread._local,_thread._local'
ignored-modules = ''
missing-member-hint = 'yes'
missing-member-hint-distance = '1'
missing-member-max-choices = '1'
[tool.pylint.SIMILARITIES]
ignore-comments = 'yes'
ignore-docstrings = 'yes'
ignore-imports = 'no'
min-similarity-lines = '4'
[tool.pylint.LOGGING]
logging-modules = 'logging'
logging-format-style = 'new'
[tool.pylint.VARIABLES]
additional-builtins = '_'
allow-global-unused-variables = 'yes'
callbacks = 'cb_,_cb'
dummy-variables-rgx = '_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy'
ignored-argument-names = '_.*'
init-import = 'no'
redefining-builtins-modules = 'six.moves,future.builtins'
[tool.pylint.MISCELLANEOUS]
notes = 'FIXME,XXX'
[tool.pylint.BASIC]
argument-rgx = '(([a-z][a-z0-9_]{2,40})|(_[a-z0-9_]*))$'
attr-rgx = '(([a-z][a-z0-9_]{2,40})|(_[a-z0-9_]*))$'
bad-names = 'foo,bar,baz,toto,tutu,tata'
class-attribute-rgx = '([A-Za-z_][A-Za-z0-9_]{2,40}|(__.*__))$'
class-rgx = '[A-Z_][a-zA-Z0-9]+$'
const-rgx = '(([A-Z_][A-Z0-9_]*)|(__.*__))$'
docstring-min-length = '-1'
function-rgx = '(([a-z][a-z0-9_]{2,40})|(_[a-z0-9_]*))$'
good-names = 'i,j,k,ex,Run,_'
include-naming-hint = 'no'
inlinevar-rgx = '[A-Za-z_][A-Za-z0-9_]*$'
method-rgx = '(([a-z][a-z0-9_]{2,40})|(_[a-z0-9_]*))$'
module-rgx = '(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$'
name-group = ''
no-docstring-rgx = '^_'
property-classes = 'abc.abstractproperty'
variable-rgx = '(([a-z][a-z0-9_]{2,40})|(_[a-z0-9_]*))$'
[tool.pylint.CLASSES]
defining-attr-methods = '__init__,__new__,setUp,__enter__'
exclude-protected = '_asdict,_fields,_replace,_source,_make'
[tool.pylint.DESIGN]
max-args = '5'
max-attributes = '20'
max-bool-expr = '6'
max-branches = '12'
max-locals = '15'
max-parents = '7'
min-public-methods = '2'
max-public-methods = '20'
max-returns = '6'
max-statements = '50'
[tool.pylint.EXCEPTIONS]
overgeneral-exceptions = ''