default_language_version:
  python: "3.13"
repos:
  - repo: https://github.com/compilerla/conventional-pre-commit
    rev: v4.0.0
    hooks:
      - id: conventional-pre-commit
        stages: [commit-msg]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-ast
      - id: check-case-conflict
      - id: check-merge-conflict
      - id: check-toml
      - id: debug-statements
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: trailing-whitespace
  - repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: "v0.11.0"
    hooks:
      - id: ruff
        args: ["--fix"]
      - id: ruff-format
  - repo: https://github.com/crate-ci/typos
    rev: v1.30.3
    hooks:
      - id: typos
  - repo: https://github.com/pycontribs/mirrors-prettier
    rev: "v3.5.3"
    hooks:
      - id: prettier
        exclude: ".all-contributorsrc"
  - repo: https://github.com/ComPWA/taplo-pre-commit
    rev: v0.9.3
    hooks:
      - id: taplo-format
        exclude: "uv.lock"
  - repo: local
    hooks:
      - id: mypy
        name: mypy
        entry: uv run --all-groups mypy
        language: system
        exclude: "test_decimal_constraints|examples/fields/test_example_2"
        types: [python]
        require_serial: true
      - id: pyright
        name: pyright
        exclude: "tests"
        language: system
        entry: uv run --all-groups pyright
        types: [python]
  - repo: https://github.com/sphinx-contrib/sphinx-lint
    rev: "v1.0.0"
    hooks:
      - id: sphinx-lint
