Repository navigation
Expand file tree
/
Copy pathruff.toml
More file actions
70 lines (67 loc) · 1.8 KB
/
Copy pathruff.toml
File metadata and controls
70 lines (67 loc) · 1.8 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
line-length = 112
extend-exclude = [
"samples",
"src/uds/transports/*/scripts",
"src/uds/migrations"
]
[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-line-length = "dynamic"
[lint]
# B023 is bogus on ruff 0.16.3 at least
# B017 is blind exception.. even when you want to :)
# PLC0414 is a nonsense. Reexports are done by import alias as same name as imported
# TRY002 is for create your own exception class, but we want to use the base one for now
# S110 is try/except/pass, for now keep as is
# DTZ006 Is datetime without tz, but this is buggy beceuse we use "make_aware" from django...
# RUF009 is a false positive here: types.rest.NotRequired.field() is a helper that
# returns a real dataclasses.field, so it is exactly the pattern RUF009 recommends.
# Each call generates its own Field instance (dataclass mutates the Field name when
# processing the class, so sharing a single precomputed Field across classes is unsafe).
# N999 is dropped: package dirs named like our real modules (e.g. REST) are
# legitimately CamelCase, and this rule cannot be scoped per-repo
ignore = [
"I001",
"BLE001",
"B023",
"B017",
"PLC0414",
"TRY002",
"S110",
"DTZ006",
"RUF009",
"N999"
]
# "I001" for sort order fix
# Use with a LOT OF CARE, some dependencies can break if reordered
# Should not , but does :)
fixable = [
"F541",
"F841",
"UP006",
"UP007",
"UP008",
"UP037",
"UP032",
"UP045",
"SIM102",
"SIM103",
"SIM114",
"SIM210",
"S110",
"F401",
"FURB136",
"TC005",
"C401",
"PIE790",
"RUF100",
"PLR2044",
]
[lint.isort]
force-single-line = true
known-first-party = ["src"]
lines-between-types = 1
no-lines-before = ["future", "standard-library"]