Skip to content

Commit

Permalink
Fix outdated doc for handling the default file types with the pre-com…
Browse files Browse the repository at this point in the history
…mit hook (#15401)

Co-authored-by: Antoine DECHAUME <>
  • Loading branch information
AntoineD authored Jan 10, 2025
1 parent 6e9ff44 commit 73d424e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
- id: ruff-format
```

To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowed filetypes:
To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed filetypes:

```yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
Expand All @@ -137,11 +137,11 @@ To run the hooks over Jupyter Notebooks too, add `jupyter` to the list of allowe
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
types_or: [ python, pyi ]
```

When running with `--fix`, Ruff's lint hook should be placed _before_ Ruff's formatter hook, and
Expand Down

0 comments on commit 73d424e

Please sign in to comment.