# Install pre-commit hooks via
# pre-commit install

exclude: >
    (?x)^(
      \.vscode/settings\.json|
      tests/test_commonmark/commonmark\.json|
      .*\.xml|
      tests/.*/.*\.md|
      tests/.*/.*\.yaml
    )$

repos:

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
    - id: check-json
    - id: check-yaml
    - id: end-of-file-fixer
    - id: trailing-whitespace

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.14.11
    hooks:
    - id: ruff-check
      args: [--fix]
    - id: ruff-format

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.19.1
    hooks:
    - id: mypy
      args: [--config-file=pyproject.toml]
      additional_dependencies:
      - types-urllib3
      - sphinx~=8.2
      - markdown-it-py~=4.0
      - mdit-py-plugins~=0.5.0
      files: >
        (?x)^(
            myst_parser/.*py|
        )$
