# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "CHANGELOG.md"
default_stages: [ pre-commit ]

repos:
    -   repo: https://github.com/pre-commit/pre-commit-hooks
        rev: v4.5.0
        hooks:
            -   id: debug-statements
            -   id: check-builtin-literals
            -   id: check-case-conflict
            -   id: check-docstring-first
            -   id: check-json
            -   id: check-toml
            -   id: check-yaml
            -   id: detect-private-key
            -   id: end-of-file-fixer
            -   id: trailing-whitespace
    -   repo: https://github.com/astral-sh/uv-pre-commit
        rev: 0.9.1
        hooks:
          - id: uv-sync
            args: ["--locked", "--all-packages"]
    -   repo: https://github.com/codespell-project/codespell
        rev: v2.2.6
        hooks:
            -   id: codespell
                exclude: >
                    (?x)^(
                        .*\.ambr
                    )$
    -   repo: https://github.com/charliermarsh/ruff-pre-commit
        rev: v0.13.2
        hooks:
            -   id: ruff-format
            -   id: ruff
                args:
                    - --fix
    -   repo: https://github.com/pre-commit/mirrors-mypy
        rev: v1.7.1
        hooks:
            -   id: mypy
                exclude: cli.py
                additional_dependencies: [ "types-paho-mqtt" ]
    -   repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
        rev: v9.23.0
        hooks:
            -   id: commitlint
                stages: [commit-msg]
                additional_dependencies: ['@commitlint/config-conventional']
