ci:
  autoupdate_schedule: monthly

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: end-of-file-fixer
      - id: fix-byte-order-marker
      - id: mixed-line-ending
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
      - id: check-json
      - id: check-toml
      - id: check-yaml
      - id: check-executables-have-shebangs
        exclude: "tests/assets/script/no-shebang"
      - id: check-shebang-scripts-are-executable
        exclude: "tests/assets/script/not-executable"
      - id: check-ast
      - id: check-builtin-literals
      - id: check-docstring-first
      - id: debug-statements
      - id: fix-encoding-pragma
        args: [--remove]
  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: v1.10.0
    hooks:
      - id: rst-backticks
      - id: python-no-eval
      - id: python-no-log-warn
      - id: python-use-type-annotations

  - repo: https://github.com/PyCQA/autoflake
    rev: v2.2.1
    hooks:
      - id: autoflake
  - repo: https://github.com/hhatto/autopep8
    rev: v2.0.4
    hooks:
      - id: autopep8
  - repo: https://github.com/tox-dev/pyproject-fmt
    rev: "1.2.0"
    hooks:
      - id: pyproject-fmt
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "v3.0.3"
    hooks:
      - id: prettier
        types_or:
          - json
          - yaml
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.17
    hooks:
      - id: mdformat
        additional_dependencies:
          - mdformat-gfm
          - mdformat-frontmatter
          - mdformat-footnote

  - repo: https://github.com/asottile/reorder-python-imports
    rev: v3.12.0
    hooks:
      - id: reorder-python-imports
        args: [--py39-plus]
  - repo: https://github.com/asottile/add-trailing-comma
    rev: v3.1.0
    hooks:
      - id: add-trailing-comma
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.14.0
    hooks:
      - id: pyupgrade
        args: [--py39-plus]
  - repo: https://github.com/PyCQA/docformatter
    rev: v1.7.5
    hooks:
      - id: docformatter
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: "v0.0.292"
    hooks:
      - id: ruff
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.5.1
    hooks:
      - id: mypy
