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"
|
description: "Run 'ruff' for extremely fast Python linting"
|
||||||
entry: ruff check --force-exclude
|
entry: ruff check --force-exclude
|
||||||
language: python
|
language: python
|
||||||
types_or: [python, pyi]
|
types_or: [python, pyi, jupyter]
|
||||||
args: []
|
args: []
|
||||||
require_serial: true
|
require_serial: true
|
||||||
additional_dependencies: []
|
additional_dependencies: []
|
||||||
@ -14,7 +14,7 @@
|
|||||||
description: "Run 'ruff format' for extremely fast Python formatting"
|
description: "Run 'ruff format' for extremely fast Python formatting"
|
||||||
entry: ruff format --force-exclude
|
entry: ruff format --force-exclude
|
||||||
language: python
|
language: python
|
||||||
types_or: [python, pyi]
|
types_or: [python, pyi, jupyter]
|
||||||
args: []
|
args: []
|
||||||
require_serial: true
|
require_serial: true
|
||||||
additional_dependencies: []
|
additional_dependencies: []
|
||||||
|
@ -41,7 +41,7 @@ To enable lint fixes, add the `--fix` argument to the lint hook:
|
|||||||
- id: ruff-format
|
- 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
|
```yaml
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- 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:
|
hooks:
|
||||||
# Run the linter.
|
# Run the linter.
|
||||||
- id: ruff
|
- id: ruff
|
||||||
types_or: [ python, pyi, jupyter ]
|
types_or: [ python, pyi ]
|
||||||
args: [ --fix ]
|
args: [ --fix ]
|
||||||
# Run the formatter.
|
# Run the formatter.
|
||||||
- id: ruff-format
|
- 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
|
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