ci:
  autofix_pr: false
  autoupdate_commit_msg: 'style: pre-commit autoupdate'
  autofix_commit_msg: 'style: pre-commit fixed styling'
  autoupdate_schedule: monthly

repos:
- hooks:
  - id: check-ast
  - id: check-merge-conflict
  - id: trailing-whitespace
    exclude: \.rich\.svg$
  - id: mixed-line-ending
  - id: fix-byte-order-marker
  - id: check-case-conflict
  - id: check-json
  - id: end-of-file-fixer
  repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v6.0.0
- hooks:
  - args:
    - --in-place
    - --expand-star-imports
    - --remove-all-unused-imports
    - --ignore-init-module-imports
    id: autoflake
  repo: https://github.com/myint/autoflake
  rev: v2.3.3

- repo: local
  hooks:
  - id: replace-words
    name: Replace Words
    entry: python3 scripts/replace_words.py
    language: system
    files: \.(md|py)$
  - id: clean-changelog-fragments
    name: Clean Changelog Fragments
    entry: python3 scripts/clean_changelog_fragments.py
    language: system
    files: ^changelog\.d/.*\.md$

- repo: https://github.com/asottile/setup-cfg-fmt
  rev: v3.2.0
  hooks:
  - id: setup-cfg-fmt

- repo: https://github.com/pycqa/isort
  rev: 9.0.0a3
  hooks:
  - id: isort
    name: isort (python)

- hooks:
  - args:
    - --py38-plus
    id: pyupgrade
  repo: https://github.com/asottile/pyupgrade
  rev: v3.21.2
- hooks:
  - id: black
  repo: https://github.com/psf/black
  rev: 26.5.1
- hooks:
  - id: blacken-docs
    args: [-l80]
    additional_dependencies:
    - black==25.1.0
  repo: https://github.com/adamchainz/blacken-docs
  rev: 1.20.0


- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
  rev: v2.16.0
  hooks:
  - id: pretty-format-yaml
    args: [--autofix, --indent, '2']

- hooks:
  - id: commitizen
    stages:
    - commit-msg
  repo: https://github.com/commitizen-tools/commitizen
  rev: v4.16.4


# - repo: https://github.com/PyCQA/docformatter
#   rev: v1.7.5
#   hooks:
#   - id: docformatter

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

- repo: https://github.com/rhysd/actionlint
  rev: v1.7.12
  hooks:
  - id: actionlint

- repo: https://github.com/crate-ci/typos
  rev: v1
  hooks:
  - id: typos
