default_language_version:
  python: python3.11

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: mixed-line-ending
      - id: check-merge-conflict
      - id: check-case-conflict
      - id: debug-statements
      - id: check-ast
      - id: check-json
      - id: check-symlinks
      - id: destroyed-symlinks
      - id: check-executables-have-shebangs
      - id: check-shebang-scripts-are-executable

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.11.2
    hooks:
      # Run the linter
      - id: ruff
        args: ["--fix"]
      # Run the formatter
      - id: ruff-format

  - repo: https://github.com/astral-sh/uv-pre-commit
    rev: 0.6.11
    hooks:
      - id: uv-lock

  - repo: local
    hooks:
      - id: mypy
        name: mypy
        entry: uv run mypy
        language: system
        "types_or": [python, pyi]
        args: ["--scripts-are-modules"]
        require_serial: true
