-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
63 lines (54 loc) · 2.02 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
target-version = "py39"
line-length = 99
indent-width = 4
# Respect the gitignore by not messing with that stuff
# This is already true by default
respect-gitignore = true
[format]
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Screw yall we preserve quotes here
quote-style = "preserve"
[lint]
# Linting rules we are using
select = [
"E4",
"E7",
"E9",
"F", # flake8
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
#"NPY", # numpy
#"PD", # pandas
#"FAST", # fastapi
"W191", # tab indentation
"W291", # trailing whitespace (--fix this)
"W605", # invalid escape sequence
]
# Linting rules we are ignoring
ignore = [
"F401", # unused imports; can just deal w/ that manually
"E712", # if a is True. sometimes syntax looks better this way
"E722", # allow the bare except if you aint using it
"E731", # lambda assignment. screw yall i can do whatever i want
"C417", # unnecessary-map; it seems ok syntactically and more readable
"B018", # useless expression; sometimes it is needed
"B905", # zip without explicit strict=True. It should be good practice but for prototyping and code readibility it can just be debugged honestly
"B008", # function call as default argument. Again, common sense should apply here that the function call only runs once
"B007", # unused loop variable. This is ok stylistically
"B006", # mutable argument as default argument. I GET IT; it's only called once. However, there are edge cases where the rule must be broken
]
# Only these rules are fixable when doing `ruff check --fix`
fixable = [
"E401", # multiple imports on 1 line
"E703", # unnecessary semicolon
"E711", # None comparison should be `cond is None`
"I", # anything under import sorting
"W191", # indentation contains tabs rather than spaces
"W291", # trailing whitespace
]