Raise ruff line-length to 100 and extend the local pre-commit format pipeline (def-signature magic-comma normalization, short multi-line assert collapse, kwarg '=' spacing, blank-line-after-short-import removal, adjacent string-literal / f-string+plain merge, redundant-pass pruning). Every transform re-checks the file AST and is dropped if it would differ; the whole-repo reformat is verified AST-identical per file and idempotent.
21 lines
689 B
YAML
21 lines
689 B
YAML
repos:
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.15.15
|
|
hooks:
|
|
- id: ruff
|
|
args:
|
|
- --fix
|
|
- --exit-non-zero-on-fix
|
|
exclude: '\.ipynb$'
|
|
- repo: local
|
|
hooks:
|
|
- id: ruff-format-with-kwargs
|
|
name: Ruff format with kwarg spacing
|
|
entry: scripts/run_ruff_format.py
|
|
language: python
|
|
types: [python]
|
|
# Mirror ruff's [tool.ruff] extend-exclude so this hook does not
|
|
# half-process files ruff itself skips (which produced churn).
|
|
exclude: '(chat_templates|ollama_template_mappers|_auto_install|mapper)\.py$'
|
|
additional_dependencies:
|
|
- ruff==0.6.9
|