ci:
  autoupdate_commit_msg: "chore: update pre-commit hooks"
  autofix_commit_msg: "style: pre-commit fixes"

repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: "v6.0.0"
  hooks:
  - id: check-added-large-files
  - id: check-case-conflict
  - id: check-merge-conflict
  - id: check-symlinks
  - id: check-yaml
  - id: debug-statements
  - id: end-of-file-fixer
  - id: mixed-line-ending
  - id: requirements-txt-fixer
  - id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
  rev: "v0.15.5"
  hooks:
    - id: ruff-check
      args: ["--fix", "--unsafe-fixes"]
    - id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
  rev: "v1.19.1"
  hooks:
  - id: mypy
    files: ^(plumbum|examples)
    args: []
    additional_dependencies:
      - types-paramiko
      - types-colorama
      - pytest<9  # pytest 9 requires Python 3.10+
      - ipython
      - pillow

- repo: https://github.com/abravalheri/validate-pyproject
  rev: "v0.25"
  hooks:
  - id: validate-pyproject

- repo: https://github.com/codespell-project/codespell
  rev: "v2.4.2"
  hooks:
  - id: codespell
    args: ["-w"]
    additional_dependencies: [tomli]
    exclude: "(^pyproject.toml|.po)$"

- repo: https://github.com/pre-commit/pygrep-hooks
  rev: "v1.10.0"
  hooks:
  - id: rst-backticks
  - id: rst-directive-colons
  - id: rst-inline-touching-normal

- repo: https://github.com/henryiii/flake8-lazy
  rev: v0.8.1
  hooks:
    - id: flake8-lazy
      args: [--apply=set]
      files: "^plumbum"
