A pre-commit hook for Ruff.
Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from PyPI.
For pre-commit: see https://github.com/pre-commit/pre-commit
For Ruff: see https://github.com/charliermarsh/ruff
Add this to your .pre-commit-config.yaml
:
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.245'
hooks:
- id: ruff
Or, to enable autofix:
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.245'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
MIT