-
Notifications
You must be signed in to change notification settings - Fork 201
/
pyproject.toml
149 lines (145 loc) · 4.1 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
144
145
146
147
148
149
[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
"consider-using-in", # ruff does this
"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-positional-arguments",
"too-many-public-methods",
"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-return", # need it for mypy
]
[tool.ruff]
target-version = "py39"
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",
# this is unnecessary, and the workaround is silly
"ANN101",
# 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",
"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",
]
line-length = 120
lint.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]
"bikeshed/Spec.py" = ["N813", "E731"]
"bikeshed/h/dom.py" = ["N818"]
"bikeshed/__init__.py" = ["E402", "T201"]
"bikeshed/cli.py" = ["S102"]
"bikeshed/extensions.py" = ["S102"]
"bikeshed/messages.py" = ["T201", "SIM115", "PLW0603"]
"bikeshed/lexers.py" = ["RUF012"]
"bikeshed/pyg.py" = ["RUF012"]
[tool.ruff.lint.flake8-implicit-str-concat]
allow-multiline = false