-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
141 lines (136 loc) · 3.78 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
[tool.black]
line-length = 120
[tool.pylint."MESSAGES CONTROL"]
disable = [
"arguments-differ",
"broad-except",
"broad-exception-raised", # Only available in later pylint
"c-extension-no-member", # seems to be weird false pos
"consider-iterating-dictionary", # lol no
"consider-using-f-string", # don't care
"duplicate-code", # dont' care
"eval-used", # needed
"exec-used", # needed
"fixme",
"global-statement", # needed
"import-outside-toplevel", # needed
"inconsistent-return-statements", # don't care
"invalid-name", # SUPER don't care
"keyword-arg-before-vararg", # literally nonsensical
"line-too-long", # black takes care of my line lengths
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"missing-timeout", # TODO: fix
"no-else-break", # i prefer this actually
"no-else-continue", # ditto
"no-else-raise", # ditto
"no-else-return", # ditto
"pointless-string-statement", # fine as alt comment syntax
"redefined-builtin",
"superfluous-parens", # don't care
"too-few-public-methods", # dumb
"too-many-arguments", # dumb
"too-many-boolean-expressions", # needed
"too-many-branches", # needed
"too-many-instance-attributes", # dumb
"too-many-lines",
"too-many-locals", # dumb
"too-many-nested-blocks",
"too-many-return-statements",
"too-many-statements",
"unnecessary-lambda",
"unsubscriptable-object", # false positives
"unsupported-binary-operation", # false pos on type sigs, plus mypy catches anyway
"use-dict-literal", # don't care
"useless-import-alias", # need it for rust
"useless-return", # need it for mypy
"cyclic-import", # one single import, not actually a problem
]
[tool.ruff]
target-version = "py37"
line-length = 120
[too.ruff.lint]
ignore = [
"E501",
# bare except is fine
"E722",
# don't care
"E741",
# don't care
"E743",
# handling unused imports elsewhere
"F401",
# ditto
"F405",
# flake8 doesn't understand typing overloads
"F811",
# caught by pylint and I'm not silencing two things
"F821",
"N802",
"N803",
"N806",
"N812",
"N815",
"N816",
"N999",
# I use Any sparingly and only when necessary already
"ANN401",
# assert is for type annotations
"S101",
# Not doing any secure crypto, just hashing
"S324",
# these are all dumb
"PLR2004",
"PLC1901",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR5501",
# I do this on purpose a lot
"PLW2901",
# Disable multiline string concatenation entirely
"ISC003",
# I violate all of these for readability on purpose
"SIM102",
"SIM103",
"SIM108",
"SIM114",
# I have no idea what these are guarding against.
"RUF001",
"RUF002",
"RUF003",
# Nah, I'm fine with it as written.
"RUF005",
# I'm fine with both of these
"S602",
"S607",
]
select = [
"ANN",
"E",
"F",
"N",
"W",
"I",
"YTT",
"S",
"PL",
"COM",
"C4",
# Activate later: "DTZ",
"EM",
"EXE",
"INP",
"T20",
"RSE",
"ISC",
"SIM",
# Activate later: "PTH",
# Active later: "TRY",
"RUF"
]
[tool.ruff.lint.per-file-ignores]
[tool.ruff.lint.flake8-implicit-str-concat]
allow-multiline = false