mirror of
https://github.com/kyutai-labs/delayed-streams-modeling.git
synced 2026-01-06 01:12:54 +00:00
Enable ruff in the pre-commit hooks (#124)
* Enable ruff in the pre-commit hooks. * Disable the old hooks. * Install uv in the CI.
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
language: system
|
||||
entry: bash -c 'uvx ruff check'
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
- id: ruff-format
|
||||
name: ruff format
|
||||
language: system
|
||||
entry: bash -c 'uvx ruff format --check'
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
# Get rid of Jupyter Notebook output because we don't want to keep it in Git
|
||||
- repo: https://github.com/kynan/nbstripout
|
||||
rev: 0.8.1
|
||||
@@ -9,14 +23,3 @@ repos:
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
args: ["--maxkb=2048"]
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.11.7
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff
|
||||
types_or: [python, pyi] # Don't run on `jupyter` files
|
||||
args: [--fix]
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
types_or: [python, pyi] # Don't run on `jupyter` files
|
||||
|
||||
Reference in New Issue
Block a user