-
Notifications
You must be signed in to change notification settings - Fork 4
/
ruff.toml
38 lines (36 loc) · 1.86 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
extend = "ruff-base.toml"
# These are files to exclude for this project.
extend-exclude = [
# "**/*.ipynb", # commonly not ruff-compliant
"dev_utils",
]
# These are rules that commonly cause many ruff warnings. Code will be improved by
# incrementally fixing code to adhere to these rules, but for practical purposes they
# can be ignored by uncommenting each one. You can also add to this list as needed.
lint.extend-ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"PLC1901", # compare-to-empty-string
"PLR0911", # Too many returns
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PGH004", # Use specific rule codes when using `noqa`
"D205", # 1 blank line required between summary line and description
"ARG001", # Unused function argument
"PLW2901", # `for` loop variable overwritten by assignment target
"C401", # Unnecessary generator (rewrite as a `set` comprehension)
"C402", # Unnecessary generator (rewrite as a dict comprehension)
"C405", # Unnecessary `list` literal (rewrite as a `set` literal)
"C408", # Unnecessary `dict` call (rewrite as a literal)
"C416", # Unnecessary `dict` comprehension (rewrite using `dict()`)
"G010", # warn is deprecated in favor of warning
"TID252", # Relative imports from parent modules are banned (DO NOT FIX: namespace)
"PLW0603", # Using the global statement to update `password` is discouraged
"SIM118", # Use `key in dict` instead of `key in dict.keys()`
"B007", # Loop control variable `time` not used within loop body
"E721", # Do not compare types, use `isinstance()`
"S307", # No builtin `eval()` allowed
"B904", # Within an `except` clause, raise exceptions with
"B007", # Loop control variable `i` not used within loop body
"PLW0602", # Using global for .. but no assignment is done
"PLR5501", # Use `elif` instead of `else` then `if`, to reduce indentation
]