default_language_version:
  python: python3.11

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.6.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.5.4
    hooks:
      # Run the linter
      - id: ruff
        args: ["--fix"]
      # Run the formatter
      - id: ruff-format

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