diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aee5b3b77e..f16458b29a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,22 @@ repos: args: [--allow-multiple-documents] - id: end-of-file-fixer - id: trailing-whitespace +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.6.7 + hooks: + # Run the linter. + - id: ruff + args: + - --fix + - --config + - python/sdist/pyproject.toml + + # Run the formatter. + - id: ruff-format + args: + - --config + - python/sdist/pyproject.toml - repo: https://github.com/asottile/pyupgrade rev: v3.17.0