Skip to content

Commit 216143e

Browse files
committed
Update ruff fixable rules
1 parent 431934b commit 216143e

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ repos:
1212
rev: v0.15.0
1313
hooks:
1414
- id: ruff-check
15-
# fix imports:
16-
# - I001: Bad import order or format
17-
# - F401: Unused import
18-
args: [ '--fix', '--fixable', 'I001,F401' ]
15+
args: [ '--fix' ]
1916
- id: ruff-format
2017

2118
- repo: https://github.com/astral-sh/uv-pre-commit

pyproject.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,17 @@ ignore = [
5252
"D107",
5353
]
5454
fixable = [
55-
# type checking, annotations
56-
"TC",
57-
"ANN",
58-
# imports
59-
"F401",
60-
"I001",
55+
"TC", # type checking
56+
"ANN", # type annotations
57+
"F401", # unused imports
58+
"I001", # unsorted imports
59+
"UP", # pyupgrade
60+
"PLR1730", # if min/max over if else
61+
"RET505", # superfluous else-return
62+
"PLR5501", # collapse else-if into elif
63+
"F541", # superfluous f-string prefix
64+
"F841", # unused variable
65+
"B007", # unused loop variable
6166
]
6267

6368
[tool.ruff.lint.pydocstyle]

0 commit comments

Comments
 (0)