-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathruff.toml
More file actions
89 lines (82 loc) · 2.23 KB
/
ruff.toml
File metadata and controls
89 lines (82 loc) · 2.23 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
target-version = "py310"
preview = true
lint.select = [
"ALL",
]
include = [
"pyproject.toml",
"src/**/*.py",
"tests/**/*.py",
]
lint.extend-ignore = [
# Later (or never)
"CPY", # Copyright
"A",
"ANN",
"ERA",
"FBT",
"D",
"DOC",
# False positive (or not)
"S101", # Use of `assert` detected
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"COM812", # ...
"T201", # Print...
"PERF401", # list comprehension - explicit append loop is clearer
"RUF069", # floating point comparison
# Fix later (or not)
"E501", # line-too-long
"TRY003", # raise-vanilla-args
"C901", # complex-structure
"PLR0912", # too-many-branches
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"PLW1514", # unspecified-encoding
"S603", # subprocess-without-shell-equals-true
"S607", # start-process-with-partial-path
"B007", # unused-loop-control-variable
"S404", # suspicious-subprocess-import
"B905", # zip-without-explicit-strict
"FURB148", # unnecessary-enumerate
"PLR0914", # too-many-locals
"RUF067", # non-empty-init-module
"SIM102", # collapsible-if
"TRY300", # try-consider-else
"ARG001",
"PLR0904",
"PLR0911",
"PLR0917",
"PLR0913",
"PLR6301",
"BLE001", # blind-except
"PLC0415", # import-outside-top-level
"PLW1510", # subprocess-run-without-check
"PLR0916", # too-many-boolean-expressions
"DTZ005", # call-datetime-now-without-tzinfo
"FURB113", # repeated-append
"N806", # non-lowercase-variable-in-function
]
[lint.extend-per-file-ignores]
"tests/**/*.py" = [
# Keep
"PLR6301", # no-self-use
#
"BLE001", # blind-except
"D",
"DOC",
"ANN",
"PLR2004",
"INP001",
"PLC0415", # runtime imports for optional dependencies
"E501", # line too long in test assertions
"N802", # naming
"ARG001", # unused-function-argument
"SLF001", # private-member-access
"B017", # assert-raises-exception
"PT011", # pytest-raises-too-broad
]
[lint.isort]
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
known-first-party = ["p2w"]