Check Jupyter notebooks by default, in sync with 0.6.0 (#96)
This commit is contained in:
parent
718fbf5fa5
commit
20d9ac3f11
@ -3,7 +3,7 @@
|
||||
description: "Run 'ruff' for extremely fast Python linting"
|
||||
entry: ruff check --force-exclude
|
||||
language: python
|
||||
types_or: [python, pyi]
|
||||
types_or: [python, pyi, jupyter]
|
||||
args: []
|
||||
require_serial: true
|
||||
additional_dependencies: []
|
||||
@ -14,7 +14,7 @@
|
||||
description: "Run 'ruff format' for extremely fast Python formatting"
|
||||
entry: ruff format --force-exclude
|
||||
language: python
|
||||
types_or: [python, pyi]
|
||||
types_or: [python, pyi, jupyter]
|
||||
args: []
|
||||
require_serial: true
|
||||
additional_dependencies: []
|
||||
|
@ -41,7 +41,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
|
||||
@ -50,11 +50,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
|
||||
|
Loading…
Reference in New Issue
Block a user