# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-added-large-files
      - id: check-toml

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.15.4
    hooks:
      - id: ruff
        args: [--fix, "--line-length=88", --exit-non-zero-on-fix, --select, "I"]
      - id: ruff
        name: ruff-check-f401
        args: [--select, "F401", --exit-non-zero-on-fix]

  - repo: https://github.com/jsh9/pydoclint
    rev: "0.8.3"
    hooks:
      - id: pydoclint
        args: [
          --style=google,
          # Current settings (not because we think they're right, but because we
          # don't want a baseline the size of the codebase)
          --arg-type-hints-in-docstring=False,
          --skip-checking-raises=True,
          --check-return-types=False,
          --allow-init-docstring=True,
          --check-class-attributes=False,
          # --check-style-mismatch=True, # Bring this back once things are a bit cleaner
        ]
        types: [python]
        files: '^ray_ascend/'

  - repo: https://github.com/psf/black
    rev: 26.1.0
    hooks:
      - id: black
        language_version: python3
        args: [--line-length=88]

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.19.1
    hooks:
      - id: mypy
        additional_dependencies: ["types-requests", "types-PyYAML"]
        args: [--ignore-missing-imports]

  - repo: https://github.com/hukkin/mdformat
    rev: 0.7.22
    hooks:
      - id: mdformat
        files: ^docs/
        additional_dependencies:
          - mdformat-gfm
          - mdformat-tables
          - mdformat-frontmatter
          - mdformat-mkdocs
        args: [--wrap, "88", "--align-semantic-breaks-in-lists"]