-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruff.toml
77 lines (68 loc) · 2.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
line-length = 94
target-version = "py310"
[lint]
select = ["ALL"]
ignore = [
# these are covered by the formatter, so they are just noise:
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
"E501", # line too long, formatter best attempts to fix this
"W293", # whitespace empty line
# missing type annotations
"ANN001",
"ANN002",
"ANN003",
"ANN201",
"ANN202",
"ANN204",
"ANN205",
"ANN401", # any type...
# # missing documentation
# "D100",
# "D101",
# "D102",
# "D103",
# "D107",
# "D205",
# "D212",
"D1",
"D2",
"D3",
"D4",
# TODO, FIXME:
"FIX002",
"TD002",
"TD003",
"FBT002", # this is nice, enable later
"S101", # disallows asserts, enable later
"ERA001", # enable later, deletes commented out code
"T201", # enable later, disallows print statements
# "TC001", # I'm not sure, see typing-only-first-party-import-tc001
"RET504", # unnecessary assign, and imho the make it more readable more often than not
"TRY003", # anal about exceptions, don't like it
"EM101", # anal exceptions
"EM102", # anal exceptions
"N806", # non lowercase variable in fn, but sizes are mostly written in upper
"N812", # lowercase imported as non lowercase, trips `import torch.nn.functional as F` which is common
"SIM108", # force ternary assignment when possible, but I sometimes prefer the explicit if else
"RET505", # unnecessary else return, they say it hampers readability, but I disagree
"PLR0913", # too many arguments, but haeh, that's life
"INP001", # i hate __init__.py, long live pep420
"UP038", # forces a subpar is instance or
"S311", # thinks I'm using rnadom for crypto, but I'm not
# "RUF007", # imho zip is more readable instead of pairwise
"PYI041", # this is a bad rule lol, int and float are not the same
"PLR1714",
]