repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.13.3
    hooks:
      - id: ruff-check
        types_or: [ python, pyi ]
        args: [ --fix ]
      - id: ruff-format
        types_or: [ python, pyi ]

  - repo: local
    hooks:
      - id: doc-builder-style
        name: Check style with doc-builder
        language: python
        entry: doc-builder style trl tests docs/source --max_len 119
        additional_dependencies: ["git+https://github.com/huggingface/doc-builder@2430c1ec91d04667414e2fa31ecfc36c153ea391", ruff]  # See GH-5633
        pass_filenames: false
        types_or: [python, markdown, rst]
