From 73d424ee5e6963d577e196d71c3b19c82e84e612 Mon Sep 17 00:00:00 2001 From: Antoine Dechaume Date: Fri, 10 Jan 2025 15:49:23 +0100 Subject: [PATCH] Fix outdated doc for handling the default file types with the pre-commit hook (#15401) Co-authored-by: Antoine DECHAUME <> --- docs/integrations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations.md b/docs/integrations.md index 44e132f9d6..71806583dd 100644 --- a/docs/integrations.md +++ b/docs/integrations.md @@ -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 @@ -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