mirror of
https://github.com/unslothai/unsloth
synced 2026-04-21 13:37:39 +00:00
fix: exclude .ipynb from ruff pre-commit hook (#4521)
The ruff pre-commit hook runs on all file types by default, including .ipynb notebooks. Colab notebooks are authored in Colab's editor and can contain IPython magics (%cd, !git) that ruff cannot parse. This causes pre-commit.ci to fail on unrelated PRs when a notebook on main has syntax ruff does not understand. Add `exclude: '\.ipynb$'` to the ruff hook so notebooks are skipped.
This commit is contained in:
parent
17dc83dc34
commit
bcf28466c2
1 changed files with 1 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ repos:
|
|||
args:
|
||||
- --fix
|
||||
- --exit-non-zero-on-fix
|
||||
exclude: '\.ipynb$'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff-format-with-kwargs
|
||||
|
|
|
|||
Loading…
Reference in a new issue