-
Notifications
You must be signed in to change notification settings - Fork 26
/
ruff.toml
95 lines (77 loc) · 1.71 KB
/
ruff.toml
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
target-version = "py37"
line-length = 80
[lint]
select = [
"A",
"ARG",
"B",
# "BLE",
"C",
"C4",
# "C90" mccabe
# Not clear if this check is useful. Too many commas everywhere.
# "COM",
# "D",
# "DTZ",
# "E",
"EXE",
"ERA",
"F",
# "FBT",
"G",
"I",
"ISC",
"ICN",
# "N",
"PGH",
# "PIE",
"PL", # Pylint
# "PT", # pytest
# "PTH",
"Q", # Quotes
# "RET",
# "RUF",
# "S",
# "SIM",
# "SLF",
"T20",
# "TCH",
# "TRY",
"UP",
"W",
"YTT",
]
ignore = [
# TBD: Unnecessary `list` comprehension (rewrite using `list()`)
"C416",
# TBD: Unnecessary `map` usage (rewrite using a `list` comprehension)
"C417",
# X is too complex
"C901",
"E501", # (line length violations).
# A warning by ruff format:
# warning: The following rules may cause conflicts when used with the formatter: `ISC001`.
"ISC001",
# Too many return statements
"PLR0911",
# Too many branches
"PLR0912",
# Too many arguments in function definition
"PLR0913",
# Too many statements
"PLR0915",
# TBD: Enable: Use `sys.exit()` instead of `exit`
"PLR1722",
# Magic value used in comparison
"PLR2004",
# Use `elif` instead of `else` then `if`, to reduce indentation
"PLR5501",
"UP035", # [*] Import from `collections.abc` instead: `Iterator`
"UP038", # [*] Use `X | Y` in `isinstance` call instead of `(X, Y)` (conflict with Pylint)
]
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
# B008 Do not perform function calls in argument defaults.
# The call is performed only once at function definition time.
[lint.per-file-ignores]
"strictdoc/server/routers/main_router.py" = ["B008"]