repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.7.4
    hooks:
      - id: ruff
        args: [--fix]
      - id: ruff-format

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-added-large-files
        args: ["--maxkb=500"]
      - id: check-merge-conflict
      - id: detect-private-key

  - repo: local
    hooks:
      - id: mypy
        name: mypy --strict
        entry: uv run mypy --strict src/cerbero_bite
        language: system
        types: [python]
        pass_filenames: false

      - id: pytest-fast
        name: pytest unit
        entry: uv run pytest tests/unit -x -q
        language: system
        types: [python]
        pass_filenames: false
        stages: [pre-commit]

      - id: pytest-golden
        name: pytest golden
        entry: uv run pytest tests/golden tests/integration -x -q
        language: system
        types: [python]
        pass_filenames: false
        stages: [pre-push]
