Touch up README

This commit is contained in:
Charlie Marsh 2023-04-03 19:20:44 -04:00
parent 3c6d40da8d
commit 6a0efc1edf

View File

@ -5,10 +5,6 @@ A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/charl
Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from
[PyPI](https://pypi.org/project/ruff/).
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`:
@ -16,7 +12,7 @@ Add this to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.257'
rev: 'v0.0.260'
hooks:
- id: ruff
```
@ -26,14 +22,16 @@ Or, to enable autofix:
```yaml
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.257'
rev: 'v0.0.260'
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.
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.
## License