-
Notifications
You must be signed in to change notification settings - Fork 451
/
.ruff.toml
102 lines (95 loc) · 1.44 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
96
97
98
99
100
101
lint.select = ["ALL"]
lint.fixable = ["ALL"]
lint.unfixable = []
lint.ignore = [
"ANN003",
"ANN101",
"ARG001",
"ARG002",
"ARG005",
"ASYNC109",
"ASYNC110",
"BLE001",
"COM812",
"COM819",
"D100",
"D104",
"D200",
"D203",
"D205",
"D212",
"D400",
"D401",
"D404",
"D405",
"E501",
"E722",
"E731",
"E741",
"EM",
"ERA001",
"F403",
"F405",
"FBT",
"INP001",
"N818",
"N999",
"PD",
"PERF203",
"PLR2004",
"PT",
"PTH",
"Q000",
"Q003",
"RUF012",
"S101",
"S104",
"S105",
"S106",
"S107",
"S303",
"S311",
"S324",
"TID",
"TRY002",
"TRY300",
"TRY301",
"TRY401",
"UP006", # Backward compatibility, remove after Python >= 3.9
]
exclude = [
".direnv",
".eggs",
".git",
".git-rewrite",
".github",
".hg",
".idea",
".mypy_cache",
".nox",
".pants.d",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pycache__",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"src/tribler/ui",
"venv",
]
line-length = 120
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py37"
[lint.pylint]
max-args = 6
max-returns = 8
max-branches = 12
max-statements = 50