Skip to content

Commit 9fa5750

Browse files
[ruff] Enable auto fix for ruff (#3268)
### Changes Enable auto fix for ruff Place ruff hook before black and isort, as recommended in https://github.com/astral-sh/ruff-pre-commit Bump version to 0.9.6 Removed deprecated option `ignore-init-module-imports` ### Reason for changes To automatically fix founded error if it possible.
1 parent 61f5886 commit 9fa5750

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ default_language_version:
22
python: python3
33

44
repos:
5+
- repo: https://github.com/astral-sh/ruff-pre-commit
6+
rev: v0.9.6
7+
hooks:
8+
- id: ruff
9+
args: [--fix, --show-fixes]
10+
511
- repo: https://github.com/psf/black
612
rev: 24.10.0
713
hooks:
@@ -14,12 +20,6 @@ repos:
1420
- id: isort
1521
name: isort (python)
1622

17-
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
# Ruff version.
19-
rev: v0.9.2
20-
hooks:
21-
- id: ruff
22-
2323
- repo: https://github.com/igorshubovych/markdownlint-cli
2424
rev: v0.43.0
2525
hooks:

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ exclude = [
116116

117117
[tool.ruff.lint]
118118
preview = true
119-
ignore-init-module-imports = true
120119
ignore = [
121120
"E201", # whitespace-after-open-bracket
122121
"E203", # whitespace-before-punctuation

0 commit comments

Comments
 (0)