Skip to content

JonathanPlasse/ruff-pre-commit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A pre-commit hook for Ruff.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 100.0%