lefthook: pixi run --no-progress --environment=lint --frozen lefthook

templates:
  run: run --quiet --no-progress --environment=lint --frozen

colors: true

output:
  - meta # Print lefthook version
  - summary # Print summary block (successful and failed steps)
  - empty_summary # Print summary heading when there are no steps to run
  # - success # Print successful steps
  # - failure # Print failed steps printing
  # - execution # Print any execution logs
  # - execution_out # Print execution output
  # - execution_info # Print `EXECUTE > ...` logging
  - skips # Print "skip" (i.e. no files matched)

pre-commit:
  parallel: true
  jobs:
    - name: dprint
      glob: "*.{json,jsonc,md,toml,yaml,yml}"
      stage_fixed: true
      run: pixi {run} dprint
    - name: ruff
      glob: "*.{py,pyi}"
      stage_fixed: true
      group:
        piped: true
        jobs:
          - name: ruff check
            run: pixi {run} ruff-check {staged_files}
          - name: ruff format
            run: pixi {run} ruff-format {staged_files}
    - name: pyright
      glob: "*.{py,pyi}"
      run: pixi {run} pyright
    - name: mypy
      glob: "*.{py,pyi}"
      run: pixi {run} mypy
    - name: typos
      stage_fixed: true
      run: pixi {run} typos
    - name: actionlint
      run: pixi {run} actionlint
    - name: blacken-docs
      glob: "*.md"
      stage_fixed: true
      run: pixi {run} blacken-docs {staged_files}
    - name: validate-pyproject
      glob: "pyproject.toml"
      run: pixi {run} validate-pyproject
    - name: numpydoc
      glob: "*.py"
      run: pixi {run} numpydoc {staged_files}
