ci:
  autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-yaml
        args: [--unsafe]
      - id: trailing-whitespace
      - id: check-toml
      - id: check-merge-conflict
      - id: end-of-file-fixer

  - repo: https://github.com/renovatebot/pre-commit-hooks
    rev: 39.7.1
    hooks:
      - id: renovate-config-validator
        files: ^renovate\.json$

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.7.2
    hooks:
      - id: ruff
        name: "lint with ruff"
      - id: ruff-format
        name: "format with ruff"

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: "v1.13.0" # Use the sha / tag you want to point at
    hooks:
      - id: mypy
        name: "run mypy"
        additional_dependencies:
          - pydantic

  - repo: https://github.com/astral-sh/uv-pre-commit
    # uv version.
    rev: 0.4.30
    hooks:
      # Update the uv lockfile
      - id: uv-lock
      - id: uv-export
        name: "Export dependencies to 'requirements.txt'"
        args:
          [
            "--no-hashes",
            "--no-dev",
            "--no-emit-project",
            "--output-file=requirements.txt",
          ]
      - id: uv-export
        name: "Export dev dependencies to 'requirements-dev.txt'"
        args:
          [
            "--no-hashes",
            "--no-emit-project",
            "--output-file=requirements-dev.txt",
          ]
