-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
120 lines (113 loc) · 3.6 KB
/
ruff.toml
File metadata and controls
120 lines (113 loc) · 3.6 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
target-version = "py310"
# preview = true
include = [
"src/**/*.py",
"tests/**/*.py",
"scripts/**/*.py",
"pyproject.toml",
]
exclude = [
"programs",
"tests/c_e2e/*/programs",
"tests/c_e2e/tryalgo/tryalgo",
"tests/c_e2e/tryalgo/tests/xtest*",
]
lint.select = [
"ALL",
]
lint.extend-ignore = [
# Later (or never)
"CPY", # Copyright
"D",
"ANN",
"ERA",
"PLR",
"N",
"TD",
"TC",
"DOC",
"PTH",
"FBT",
# False positive
"S101", # Use of `assert` detected
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"COM812", # ...
"T201", # Print...
"SIM117", # Nested `with` statements (this is a fundamental pattern in Textual)
"RUF022", # [*] unsorted-dunder-all
"FURB110",
"PLW1514",
"SLF001", # [ ] private-member-access
# Fix later (or not)
"TRY003", # [ ] raise-vanilla-args
"RET505", # [*] superfluous-else-return
"ARG001", # [ ] unused-function-argument
"E501", # [ ] line-too-long
"F401", # [-] unused-import
"UP031", # [ ] printf-string-formatting
"F841", # [ ] unused-variable
"C901", # [ ] complex-structure
"PGH004", # [ ] blanket-noqa
"FIX002", # [ ] line-contains-todo
"SIM108", # [ ] if-else-block-instead-of-if-exp
"ARG002", # [ ] unused-method-argument
"E721", # [ ] type-comparison
"RUF005", # [ ] collection-literal-concatenation
"A001", # [ ] builtin-variable-shadowing
"PLW2901", # [ ] redefined-loop-name
"B904", # [ ] raise-without-from-inside-except
"B905", # [ ] zip-without-explicit-strict
"FURB188", # [*] slice-to-remove-prefix-or-suffix
"PERF401", # [ ] manual-list-comprehension
"PLC0415", # [ ] import-outside-top-level
"A002", # [ ] builtin-argument-shadowing
"F821", # [ ] undefined-name
"S605", # [ ] start-process-with-a-shell
"SIM102", # [ ] collapsible-if
"BLE001", # [ ] blind-except
"C416", # [ ] unnecessary-comprehension
"FIX001", # [ ] line-contains-fixme
"PIE810", # [ ] multiple-starts-ends-with
"PLC0206", # [ ] dict-index-missing-items
"PT018", # [ ] pytest-composite-assertion
"RUF100", # [*] unused-noqa
"S306", # [ ] suspicious-mktemp-usage
"S603", # [ ] subprocess-without-shell-equals-true
"S607", # [ ] start-process-with-partial-path
"SIM105", # [ ] suppressible-exception
"UP007", # [ ] non-pep604-annotation-union
"PGH003",
"PERF203",
]
[lint.extend-per-file-ignores]
"tests/**/*.py" = [
"E711",
"E712",
"E501", # line too long in test assertions
"S311", # [ ] suspicious-non-cryptographic-random-usage
"S307", # [ ] suspicious-eval-usage
"S112", # [ ] try-except-continue
"SIM110", # [ ] reimplemented-builtin
"ARG001", # [ ] unused-function-argument
"B007", # [ ] unused-loop-control-variable
"B905", # [ ] zip-without-explicit-strict
"EM102", # [ ] f-string-in-exception
"F841", # [*] unused-variable
"FIX002", # [ ] line-contains-todo
"S102", # [ ] exec-builtin
"TRY003", # [ ] raise-vanilla-args
"TRY004", # [ ] type-check-without-type-error
#
"PLW1509", # subprocess-popen-preexec-fn
"PT028", # pytest-parameter-with-default-argument
"E741", # ambiguous-variable-name
"PLW1510", # subprocess-run-without-check
"EXE001", # shebang-not-executable
"S110", # try-except-pass
"TRY300", # try-consider-else
]
[lint.isort]
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
known-first-party = ["prescrypt"]