Skip to content

Commit 6d65cd0

Browse files
chore: fix ruff rules
1 parent 1fed896 commit 6d65cd0

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

pyproject.toml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,38 +105,35 @@ line-ending = "lf"
105105
quote-style = "preserve"
106106

107107
[tool.ruff.lint]
108-
# Enable pycodestyle (`E`), Pyflakes (`F`), and isort (`I`) by default.
109108
select = [
109+
# pycodestyle
110+
"E",
110111
# Pyflakes
111112
"F",
112-
# Pycodestyle
113-
"E",
114-
"W",
113+
# pyupgrade
114+
"UP",
115+
# flake8-bugbear
116+
"B",
117+
# flake8-simplify
118+
"SIM",
115119
# isort
116-
"I001",
117-
"I002"
120+
"I",
118121
]
119-
# Skip unused variable rules
120-
ignore = []
121-
extend-ignore = ["D203", "E203", "E251", "E266", "E401", "E402", "E501", "F401", "F403"]
122+
ignore = ["D203", "E203", "E251", "E266", "E401", "E402", "E501", "F401", "F403"]
122123

123124
# Allow unused variables when underscore-prefixed.
124125
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
125126

126127
# Allow autofix for all enabled rules (when `--fix`) is provided.
127-
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
128+
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TID", "TRY", "UP", "YTT"]
128129

129130
# unfixable = []
130131

131132
[tool.ruff.lint.isort]
133+
combine-as-imports = true
132134
from-first = false
133135
no-sections = true
134-
135-
[tool.ruff.lint.empty-lines]
136-
max-blank-lines-after-class = 1
137-
max-blank-lines-after-function = 1
138-
min-after-class = 2
139-
min-after-function = 2
136+
order-by-type = true
140137

141138
[tool.ruff.lint.flake8-quotes]
142139
docstring-quotes = "double"

0 commit comments

Comments
 (0)