Update readme config examples to work with pre-commit >= 3 (#99)

Co-authored-by: Ruwen Frick <ruwen.frick@ost.ch>
This commit is contained in:
Ruwen Frick 2024-09-27 08:49:08 +02:00 committed by GitHub
parent cc915bbf18
commit 46cdcac1de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,6 +17,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https
(available as of Ruff v0.0.289) via pre-commit, add the following to your `.pre-commit-config.yaml`:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.8
@ -30,6 +31,7 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https
To enable lint fixes, add the `--fix` argument to the lint hook:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.8
@ -44,6 +46,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes:
```yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.8