-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
178 lines (174 loc) · 3 KB
/
ruff.toml
File metadata and controls
178 lines (174 loc) · 3 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
exclude = [
"__pycache__",
"examples/*.ipynb",
]
line-length = 88
indent-width = 2
target-version = "py310"
preview = true
[lint]
select = [
"YTT",
"ANN",
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"EM",
"EXE",
"FA",
"FIX",
"INT",
"ISC",
"ICN",
"LOG",
"G",
"INP",
"PIE",
"T20",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLOT",
"SIM",
"TID",
"TD",
"TC",
"ARG",
"PTH",
"FLY",
"I",
"NPY",
"N",
"PERF",
"E",
"W",
"D",
"F",
"PGH",
"PL",
"PLE",
"PLR",
"PLW",
"UP",
"FURB",
"RUF",
"TRY",
]
ignore = [
# Zip without explicit strict — more idiomatic
"B905",
# Mutable default in function arg — intentional for BeartypeConf()
"B008",
# Formatter owns trailing-comma layout
"COM812",
# `Any` is required in a few runtime-integration seams
"ANN401",
# The repo is not enforcing blanket docstring coverage
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
# Keep Black-compatible docstring layout
"D203",
"D213",
# Grouped export lists and focused docstring coverage are intentional here
"D401",
"D403",
"D413",
"D417",
"FURB189",
# Indentation rules — incompatible with 2-space indent
"E111",
"E114",
# Line too long — handled by formatter
"E501",
# Intentional re-export and optional-import patterns
"PLC0414",
"PLC0415",
"PLC2701",
# Complexity thresholds are too noisy for validator code
"PLR0904",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR2004",
"PLR6301",
# Intentional runtime protocol patterns
"PYI034",
"RUF022",
"RUF023",
"RUF067",
# Stringized imports are already handled via postponed evaluation
"TC001",
"TC003",
# Readable library error messages matter more than these stylistic rules
"TRY003",
"TRY004",
]
[lint.flake8-pytest-style]
parametrize-names-type = "csv"
[lint.per-file-ignores]
"tests/**" = [
# Imports after pytest.importorskip() — standard pytest pattern
"E402",
# pytest.raises(Exception) — intentional broad catch in tests
"B017",
# subprocess.run without check= — we inspect returncode manually
"PLW1510",
# flake8-boolean-trap is useful for API code but too noisy for tests that
# intentionally pass boolean values as sample inputs.
"FBT",
# Tests and fixtures intentionally use pytest asserts and symbolic names
"ARG001",
"ARG002",
"N802",
"N803",
"N806",
"N811",
"PGH003",
"PLC1901",
"PT011",
"RUF002",
"RUF043",
"RUF029",
"S404",
"S603",
"RUF069",
"S101",
]
"tests/typing/**" = [
# Unary prefix increment (++N) — testing operator chaining
"B002",
# Typing fixtures intentionally exercise awkward-but-supported signatures
"ANN001",
"ANN201",
"ARG001",
"ARG002",
"N802",
"N803",
"N806",
"N811",
"PGH003",
"PYI024",
"RUF029",
]
"src/shapix/_decorator.py" = [
# Public API intentionally exposes snake_case context manager name
"N801",
]
[format]
docstring-code-format = true
docstring-code-line-length = 100