-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
pyproject.toml
143 lines (133 loc) · 2.5 KB
/
pyproject.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
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
[project]
name = "oomox_gui"
version = "1.15.1"
requires-python = ">=3.10"
[tool.autopep8]
max_line_length = 120
ignore = ""
aggressive = 1
[tool.ruff]
line-length = 120
unsafe-fixes = true
[tool.ruff.lint.mccabe]
max-complexity = 19
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
select = [
"F",
"E", "W",
"C90",
"I",
"D",
"UP",
"N",
"YTT",
"ANN",
"S",
"BLE",
"FBT", # @TODO: Boolean positional arg/value in call
"B",
"A",
"C4",
"T10",
"EM",
"ISC",
"ICN",
#"T20", # @TODO: refactor print() to logging
# #"PT", # pytest
"Q",
"RET",
"SIM",
"TID",
"ARG",
"DTZ",
"ERA",
# #"PD", # pandas
"PGH",
"PL",
"PIE",
"COM",
"INP",
"EXE",
"TCH",
"TRY",
#"PTH", # @TODO: refactor os.path to pathlib.Path
"RUF",
"AIR",
"ASYNC",
#"CPY", # @TODO: add copyrights
#"DJ", # django
"FA",
"FIX",
"FLY",
"FURB",
"G",
"INT",
"LOG",
#"NPY", # numpy
"PERF",
"PYI",
"RSE",
"SLF",
"SLOT",
"TD",
]
ignore = [
# enable back later:
"C901", # "too complex"
"ERA001", # commented out code
# already managed by pylint, mb replace completely to ruff later:
"PLC0415", # `import` should be at the top-level of a file
"PLR0904", # Too many public methods
"PLR0912", # too many branches
"PLR0913", # too many arguments
"PLR0914", # too-many-locals
"PLR0915", # too many statements
"PLR0917", # Too many positional arguments
"PLR1702", # Too many nested blocks
# bandit stuff:
"S404",
"ANN101", # annotate self
"ANN102", # annotate cls
"ANN401", # disable Any
"BLE001", # disallow catching Exception
# docstrings
"D100",
"D101",
"D102",
"D103",
#
"D105",
"D106",
"D107",
"D203", # conflicts with D211
"D205",
"D212", # conflicts with D213
"D400",
"D401", # idk, it seems broken? pydocstyle.org is down so i can't check how it's supposed to work
"D415",
"PLR2044", # line with empty comment
#"Q000", # force double-quotes
"FBT003", # conflicts with GTK/gi
]
[tool.ruff.lint.per-file-ignores]
"oomog_gui/main.py" = [
"E402",
]
"plugins/*/oomox_plugin.py" = [
"INP001",
"RUF012",
"PLR6301",
]
"maintenance_scripts/*.py" = [
"INP001",
"T201",
]
"maintenance_scripts/pikaman.py" = [
"ARG002",
]
"maintenance_scripts/vulture_whitelist.py" = [
"B018",
]