Skip to content

Commit

Permalink
[ruff] Enable auto fix for ruff (#3268)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
AlexanderDokuchaev authored Feb 17, 2025
1 parent 61f5886 commit 9fa5750
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ default_language_version:
python: python3

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
hooks:
- id: ruff
args: [--fix, --show-fixes]

- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
Expand All @@ -14,12 +20,6 @@ repos:
- id: isort
name: isort (python)

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.2
hooks:
- id: ruff

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ exclude = [

[tool.ruff.lint]
preview = true
ignore-init-module-imports = true
ignore = [
"E201", # whitespace-after-open-bracket
"E203", # whitespace-before-punctuation
Expand Down

0 comments on commit 9fa5750

Please sign in to comment.