# Install once with `pixi run hooks`. Ruff and ty run through pixi so hooks use # exactly the same versions and settings as `pixi run check`. # Test fixtures are deliberately messy inputs, so hooks leave them alone. exclude: ^tests/fixtures/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-added-large-files args: [--maxkb=1000] - id: check-merge-conflict - id: check-toml - id: check-yaml exclude: ^src/.*\.ya?ml$ - id: end-of-file-fixer exclude: \.(csv|tsv)$ - id: trailing-whitespace exclude: \.(csv|tsv|md)$ - id: mixed-line-ending args: [--fix=lf] - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.38.2 hooks: - id: check-github-workflows files: ^\.gitea/workflows/.+\.ya?ml$ - repo: local hooks: - id: ruff-format name: ruff format entry: pixi run ruff format language: system types_or: [python, pyi] - id: ruff-check name: ruff check entry: pixi run ruff check --fix --exit-non-zero-on-fix language: system types_or: [python, pyi] - id: ty name: ty check entry: pixi run ty check language: system types: [python] pass_filenames: false