Skip to content

Commit

Permalink
pre-commit: Add --fix argument to Ruff
Browse files Browse the repository at this point in the history
Add --fix argument to Ruff in the pre-commit configuration. This allows automatically fixing safe issues (not it's not --unsafe-fixes).
  • Loading branch information
EwoutH authored and rht committed Sep 1, 2024
1 parent 57ec07f commit 93f04f6
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@ ci:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.6
rev: v0.6.3
hooks:
# Run the linter.
# Run the linter with fix argument.
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [--fix] # This will enable automatic fixing of lint issues where possible.
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-toml
- id: check-yaml
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- id: check-toml
- id: check-yaml

0 comments on commit 93f04f6

Please sign in to comment.