Go to file
2023-03-13 19:12:05 +00:00
.github/workflows Add check to entry (#32) 2023-03-02 10:24:35 -05:00
.gitignore Initial commit 2022-09-19 20:52:36 -06:00
.pre-commit-hooks.yaml Add check to entry (#32) 2023-03-02 10:24:35 -05:00
.version Mirror: 0.0.255 2023-03-13 19:12:05 +00:00
LICENSE Initial commit 2022-09-19 20:52:36 -06:00
README.md Add a note about recommended hook ordering (#31) 2023-03-01 14:37:50 -05:00
setup.py Mirror: 0.0.255 2023-03-13 19:12:05 +00:00

ruff-pre-commit

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

Using Ruff with pre-commit

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]

Note that Ruff's pre-commit hook should run before Black, isort, and other formatting tools.

License

MIT