# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "^(se/templates/se/opensearch.xml|doc/source/_extensions/.*)$"
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: end-of-file-fixer
      - id: check-ast
      - id: check-yaml
      - id: check-docstring-first
      - id: check-executables-have-shebangs
      - id: check-json
      - id: check-merge-conflict
      - id: check-shebang-scripts-are-executable
      - id: check-symlinks
      - id: check-toml
      - id: check-xml
      - id: check-yaml
      - id: mixed-line-ending
      - id: requirements-txt-fixer
      - id: trailing-whitespace
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.20.0
    hooks:
      - id: pyupgrade
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.12.1
    hooks:
      # Run the linter.
      - id: ruff
        args: [--fix]
      # Run the formatter.
      - id: ruff-format
  - repo: https://github.com/PyCQA/bandit
    rev: "1.8.5"
    hooks:
      - id: bandit
        exclude: "^(doc/.*|se/test_.*)$"
  - repo: https://github.com/biolds/docformatter
    rev: v1.7.6-alpha
    hooks:
      - id: docformatter
  - repo: https://github.com/PyCQA/doc8
    rev: "v2.0.0"
    hooks:
      - id: doc8
  - repo: https://github.com/PyCQA/isort
    rev: "6.0.1"
    hooks:
      - id: isort
  - repo: https://github.com/PyCQA/eradicate
    rev: "3.0.0"
    hooks:
      - id: eradicate
  - repo: https://github.com/asottile/yesqa
    rev: v1.5.0
    hooks:
      - id: yesqa
