Repository navigation
Expand file tree
/
Copy pathruff.toml
More file actions
484 lines (472 loc) · 7.13 KB
/
Copy pathruff.toml
File metadata and controls
484 lines (472 loc) · 7.13 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
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# Same as Black.
line-length = 88
indent-width = 4
# The oldest Python we support (requires-python): quote-stripping (UP037) and every other
# version-gated fix must stay valid where annotations are evaluated eagerly (< 3.14).
target-version = "py311"
[format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[lint]
# Preview is on only for the preview rules this file selects by exact code (PLW1514 below).
preview = true
explicit-preview-rules = true
exclude = [
".bzr",
".git",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".venv",
".vscode",
"__pypackages__",
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [
"YTT101",
"YTT102",
"YTT103",
"YTT201",
"YTT202",
"YTT203",
"YTT204",
"YTT301",
"YTT302",
"YTT303",
"ASYNC100",
"ASYNC105",
"ASYNC115",
"ASYNC116",
"ASYNC210",
"ASYNC220",
"ASYNC221",
"ASYNC222",
"ASYNC230",
"ASYNC251",
# "S102",
# "S110",
# "S112",
# "BLE001",
"B002",
"B003",
"B004",
"B005",
"B006",
# "B008",
"B009",
"B010",
"B012",
"B013",
"B014",
"B015",
"B016",
# "B017",
# "B018",
"B019",
"B020",
"B021",
# "B022",
# "B023",
"B025",
# "B026",
"B029",
# "B030",
"B031",
"B032",
"B033",
"B035",
# "B039",
"C400",
# "C401",
# "C402",
"C403",
"C404",
"C405",
# "C406",
# "C408",
# "C409",
"C410",
"C411",
# "C413",
"C414",
"C415",
# "C417",
"C418",
# "C419",
# "C901",
# "DTZ001",
"DTZ002",
# "DTZ003",
"DTZ004",
# "DTZ005",
# "DTZ006",
# "DTZ007",
# "DTZ011",
"DTZ012",
"DTZ901",
"T100",
# "EXE001",
# "EXE002",
"EXE004",
"EXE005",
"FA100",
"FA102",
"INT001",
"INT002",
"INT003",
# "ISC004",
# "LOG001",
"LOG002",
"LOG009",
# "LOG014",
# "LOG015",
"G010",
"G101",
# "G201",
"G202",
"PIE790",
"PIE794",
"PIE796",
"PIE800",
"PIE804",
"PIE807",
"PIE808",
# "PIE810",
"PYI001",
"PYI002",
"PYI003",
"PYI004",
"PYI005",
"PYI006",
"PYI007",
"PYI008",
"PYI009",
"PYI010",
"PYI012",
"PYI013",
"PYI015",
"PYI016",
"PYI017",
"PYI018",
"PYI019",
"PYI020",
"PYI025",
"PYI026",
"PYI029",
"PYI030",
"PYI032",
"PYI033",
# "PYI034",
"PYI035",
"PYI036",
"PYI041",
"PYI042",
"PYI043",
"PYI044",
"PYI045",
"PYI046",
"PYI047",
"PYI048",
"PYI049",
"PYI050",
"PYI052",
"PYI055",
"PYI057",
"PYI058",
"PYI059",
"PYI061",
"PYI062",
"PYI063",
"PYI064",
"PYI066",
"PT010",
# "PT014",
"PT020",
"PT025",
"PT026",
"PT031",
"RET501",
"SIM101",
# "SIM102",
# "SIM103",
"SIM107",
# "SIM113",
"SIM114",
# "SIM115",
# "SIM117",
# "SIM118",
# "SIM201",
"SIM202",
"SIM208",
"SIM210",
# "SIM211",
"SIM220",
"SIM221",
"SIM222",
"SIM223",
# "SIM401",
# "SIM905",
"SIM911",
"TC004",
"TC005",
"TC007",
"TC010",
"PTH124",
"PTH210",
# "FLY002",
# "I001",
# "N999",
"PERF101",
# "PERF102",
"PERF402",
"E722",
"E902",
"W605",
"D419",
# "F401",
# "F402",
"F404",
"F407",
"F501",
"F502",
"F503",
"F504",
"F505",
"F506",
"F507",
"F508",
"F509",
"F521",
"F522",
"F523",
"F524",
"F525",
"F541",
# "F601",
"F602",
"F621",
"F622",
"F631",
"F632",
"F633",
"F634",
"F701",
"F702",
"F704",
"F706",
"F707",
# "F811",
# "F821",
"F822",
"F823",
"F841",
"F842",
"F901",
"PGH005",
"PLC0105",
"PLC0131",
"PLC0132",
"PLC0205",
"PLC0206",
"PLC0208",
"PLC0414",
"PLC3002",
"PLE0100",
"PLE0101",
"PLE0115",
"PLE0116",
"PLE0117",
"PLE0118",
"PLE0303",
"PLE0304",
"PLE0305",
"PLE0307",
"PLE0308",
"PLE0309",
"PLE0604",
# "PLE0605",
"PLE0643",
# "PLE0704",
"PLE1132",
"PLE1142",
"PLE1205",
"PLE1206",
"PLE1300",
"PLE1307",
"PLE1310",
"PLE1507",
"PLE1519",
"PLE1520",
"PLE1700",
# "PLE2502",
"PLE2510",
"PLE2512",
"PLE2513",
"PLE2514",
"PLE2515",
# "PLR0124",
"PLR0133",
"PLR0206",
"PLR0402",
# "PLR1704",
"PLR1708",
"PLR1711",
"PLR1716",
"PLR1722",
"PLR1730",
"PLR1733",
"PLR1736",
"PLR2044",
"PLW0120",
"PLW0127",
"PLW0128",
"PLW0129",
"PLW0131",
"PLW0133",
"PLW0177",
"PLW0211",
"PLW0245",
"PLW0406",
# "PLW0602",
"PLW0604",
"PLW0642",
"PLW0711",
"PLW1501",
"PLW1507",
# "PLW1508",
"PLW1509",
"PLW1510",
"PLW1514",
"PLW2101",
"UP001",
"UP003",
"UP004",
"UP005",
"UP006",
"UP007",
"UP008",
"UP009",
"UP010",
"UP011",
"UP012",
"UP014",
"UP017",
"UP018",
"UP019",
"UP020",
"UP021",
"UP022",
"UP023",
"UP024",
"UP025",
"UP026",
"UP028",
"UP029",
"UP030",
"UP031",
"UP032",
"UP033",
"UP034",
# "UP035",
"UP036",
"UP037",
"UP039",
"UP040",
"UP041",
"UP043",
"UP044",
#"UP045",
# "UP046", # deferred: fix is PEP 695 class syntax (3.12+), project floor is py3.11
# "UP047", # deferred: fix is PEP 695 generic-callable syntax (3.12+), project floor is py3.11
"UP049",
"UP050",
"FURB105",
"FURB122",
"FURB129",
"FURB132",
"FURB136",
"FURB157",
"FURB161",
"FURB162",
"FURB163",
"FURB166",
"FURB167",
"FURB168",
"FURB169",
"FURB177",
"FURB181",
"FURB188",
"FURB192",
"RUF007",
"RUF008",
"RUF009",
"RUF010",
# "RUF012",
"RUF013",
"RUF015",
"RUF016",
"RUF017",
"RUF018",
"RUF019",
"RUF020",
"RUF022",
"RUF023",
"RUF024",
"RUF026",
"RUF028",
"RUF030",
"RUF032",
"RUF033",
"RUF034",
"RUF040",
"RUF041",
"RUF046",
"RUF048",
"RUF049",
"RUF051",
"RUF053",
"RUF057",
"RUF058",
"RUF059",
"RUF063",
"RUF068",
"RUF100",
"RUF101",
"RUF200",
# "TRY002",
# "TRY004",
# "TRY201",
# "TRY203",
# "TRY401",
"TID251",
]
[lint.flake8-tidy-imports.banned-api]
"pm.uv".msg = "Use PM's semantic Python operations, not an installer executable."
"pm.client.uv".msg = "Use PM's semantic Python operations."
"pm.install.uv".msg = "The raw uv bridge was removed; use PM operations."
"pm._uv".msg = "Tool acquisition is private to PM."
"pm.environment".msg = "The environment engine is private; use PM operations."
"pm.runtime_stage".msg = "PM stages its own worker runtime; consumers call pm operations."
[lint.per-file-ignores]
"apps/desktop/electron/fixtures/**" = ["TID251"]
"tests/pm/**" = ["TID251"]
# PLW1514: a text-mode open() without an encoding uses the locale codec on Windows (cp1252 on
# US installs) and corrupts non-ASCII content. Tests exercise locale edge cases on purpose, and
# skills and plugins follow their authors' conventions.
"tests/**" = ["PLW1514"]
"skills/**" = ["PLW1514"]
"optional-skills/**" = ["PLW1514"]
"plugins/**" = ["PLW1514"]
[lint.mccabe]
max-complexity = 20