Touch up README
This commit is contained in:
parent
3c6d40da8d
commit
6a0efc1edf
14
README.md
14
README.md
@ -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
|
Distributed as a standalone repository to enable installing Ruff via prebuilt wheels from
|
||||||
[PyPI](https://pypi.org/project/ruff/).
|
[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
|
### Using Ruff with pre-commit
|
||||||
|
|
||||||
Add this to your `.pre-commit-config.yaml`:
|
Add this to your `.pre-commit-config.yaml`:
|
||||||
@ -16,7 +12,7 @@ Add this to your `.pre-commit-config.yaml`:
|
|||||||
```yaml
|
```yaml
|
||||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
# Ruff version.
|
# Ruff version.
|
||||||
rev: 'v0.0.257'
|
rev: 'v0.0.260'
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
```
|
```
|
||||||
@ -26,14 +22,16 @@ Or, to enable autofix:
|
|||||||
```yaml
|
```yaml
|
||||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
# Ruff version.
|
# Ruff version.
|
||||||
rev: 'v0.0.257'
|
rev: 'v0.0.260'
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: [--fix, --exit-non-zero-on-fix]
|
args: [--fix, --exit-non-zero-on-fix]
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that Ruff's pre-commit hook should run before Black, isort, and other
|
Ruff's pre-commit hook should be placed after other formatting tools, such as Black and isort,
|
||||||
formatting tools.
|
_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
|
## License
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user