Skip to content

[Docs] Fix accidental cross-references in docstrings - #65157

Merged
vllm-bot merged 9 commits into
vllm-project:mainfrom
hmellor:fix-docs-xref-warnings
Nov 2, 2026
Merged

vllm-bot merged 9 commits into
vllm-project:mainfrom
hmellor:fix-docs-xref-warnings

Conversation

@hmellor

@hmellor hmellor commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Overview

Docstrings render as Markdown, so array shapes like [block][2][16] were parsed as reference links and produced mkdocs_autorefs "Could not find cross-reference target" warnings. This wraps them in code spans. A pre-commit hook to stop them coming back is in #65158.

Claims

  • Fixes the 11 reported mkdocs_autorefs warnings (kimi_k3, muse_spark) plus 3 more of the same kind (_custom_ops.py, minimax_m3).

Validation

The hook from #65158 reports 14 hits on the upstream/main versions of these files (all 11 reported warnings + 3) and 0 on every vllm/**/*.py in this branch. pre-commit run passes.

No open PR addresses this (searched "autorefs", "mkdocs_autorefs", "cross-reference docstring"). I didn't run a local mkdocs build; the RTD preview build on this PR covers that.


Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

🤖 Generated with Claude Code

Docstrings render as Markdown, so array shapes like `[block][2][16]` were
parsed as reference links and produced mkdocs_autorefs warnings. Wrap them
in code spans and add a pre-commit hook that flags reference links in
rendered docstrings whose target is not a fully qualified Python path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@hmellor
hmellor requested a review from a team November 2, 2026 12:43
@hmellor
hmellor requested a review from tjtanaa as a code owner November 2, 2026 12:43

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@mergify mergify Bot added kimi k3 minimax agents Related to information for agents labels Nov 2, 2026
hmellor and others added 3 commits November 2, 2026 12:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Rename the hook and add a rule that rewrites ``code`` as `code` in
docstrings, skipping fenced, indented and doctest blocks and spans that
contain a backtick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Mechanical rewrite by `python tools/pre_commit/check_docstring_style.py`.
Only docstrings change; ASTs are otherwise identical and line counts are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
@hmellor hmellor changed the title [Docs] Fix accidental cross-references in docstrings and lint for them [Docs] Add check-docstring-style hook and fix docstring cross-reference warnings Nov 2, 2026
@mergify mergify Bot added cohere Related to Cohere models deepseek Related to DeepSeek models frontend pooling multi-modality Related to multi-modality (#4194) mistral Related to Mistral models performance Performance-related issues quantization qwen Related to Qwen models gpt-oss Related to GPT-OSS models glm labels Nov 2, 2026
@mergify mergify Bot added beam Reflection Beam model support inkling DSv4 labels Nov 2, 2026
hmellor and others added 2 commits November 2, 2026 12:51
Moved to a separate PR to keep this one a small docs fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
hmellor and others added 2 commits November 2, 2026 12:59
Point each at the offending line rather than the docstring start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Keep this PR to the docs fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Status: Done
Status: Done
Status: Done
Status: Done
Status: Unsorted queue
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants