Skip to content

Commit 3c9c0fb

Browse files
committed
Reorder ruff config
1 parent 939c5fb commit 3c9c0fb

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

ruff.toml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ target-version = "py310"
44
select = [
55
"B", # flake8-bugbear
66
"C4", # flake8-comprehensions
7-
"E",
7+
"E", # pycodestyle-error
88
"EM", # flake8-errmsg
9+
"EXE", # flake8-executable
10+
"FURB", # refurb
11+
"NPY", # NumPy specific rules
12+
"PD", # pandas-vet
913
"PGH", # pygrep-hooks
1014
"PIE", # flake8-pie
1115
"PL", # pylint
1216
# "PTH", # flake8-use-pathlib
17+
"PYI", # flake8-pyi
1318
# "RET", # flake8-return
14-
"RUF", # Ruff-specific
19+
"RUF", # ruff-specific
1520
"SIM", # flake8-simplify
16-
"UP", # pyupgrade
1721
"SIM2", # simplify boolean comparisons
18-
"YTT", # flake8-2020
19-
"EXE", # flake8-executable
20-
"NPY", # NumPy specific rules
21-
"PD", # pandas-vet
22-
"FURB", # refurb
23-
"PYI" # flake8-pyi
22+
"UP", # pyupgrade
23+
"YTT" # flake8-2020
2424
]
2525
ignore = [
26-
"B006",
27-
"B007",
28-
"B018",
26+
"B006", # Do not use mutable data structures for argument defaults
27+
"B007", # Loop control variable {name} not used within loop body
28+
"B018", # Found useless expression. Either assign it to a variable or remove it.
2929
"E402", # Module level import not at top of file
3030
"E501", # Line too long
3131
"E741", # Ambiguous variable name
3232
"E721", # Do not compare types, use `isinstance()`
3333
"E731", # Do not assign a `lambda` expression, use a `def`
34-
"EM101",
35-
"EM102",
36-
"SIM115",
37-
"PLR",
38-
"PLW0127",
39-
"RUF015",
40-
"RUF005",
41-
"PLW2901",
42-
"NPY002",
43-
"PD002",
34+
"EM101", # Exception must not use a string literal, assign to variable first
35+
"EM102", # Exception must not use an f-string literal, assign to variable first
36+
"ISC001", # Conflicts with formatter
37+
"NPY002", # Replace legacy np.random.{method_name} call with np.random.Generator
38+
"PD002", # inplace=True should be avoided; it has inconsistent behavior
39+
"PLR", # pylint-refactor
4440
"PLR09", # Too many <...>
4541
"PLR2004", # Magic value used in comparison
46-
"ISC001" # Conflicts with formatter
42+
"PLW0127", # Self-assignment of variable {name}
43+
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
44+
"RUF005", # Consider {expression} instead of concatenation
45+
"RUF015", # Prefer next({iterable}) over single element slice
46+
"SIM115" # Use context handler for opening files
4747
]
4848

4949
[format]

0 commit comments

Comments
 (0)