Clarify order of pre-commit hooks (#3789)

This commit is contained in:
Charlie Marsh 2023-03-28 19:15:36 -04:00 committed by GitHub
parent f322bcd2bd
commit 515e436cfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,10 @@ Or, to enable autofix:
args: [--fix, --exit-non-zero-on-fix]
```
Note that Ruff's pre-commit hook should run before Black, isort, and other formatting tools.
Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort,
_unless_ you enable autofix, in which case, Ruff's pre-commit hook should run _before_ Black, isort,
and other formatting tools, as Ruff's autofix behavior can output code changes that require
reformatting.
Ruff can also be used as a [VS Code extension](https://github.com/charliermarsh/ruff-vscode) or
alongside any other editor through the [Ruff LSP](https://github.com/charliermarsh/ruff-lsp).