Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -1,7 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""
|
||||
MkDocs hook to automatically convert inline code references to API doc links.
|
||||
"""MkDocs hook to automatically convert inline code references to API doc links.
|
||||
|
||||
For example, `WeightTransferConfig` becomes
|
||||
[`WeightTransferConfig`][vllm.config.WeightTransferConfig]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
"""
|
||||
MkDocs hook + markdown extension to enable the following links to render correctly,
|
||||
"""MkDocs hook + markdown extension to enable the following links to render correctly,
|
||||
including inside content included via pymdownx.snippets:
|
||||
|
||||
- Relative file links outside of the `docs/` directory, e.g.:
|
||||
@@ -71,9 +70,7 @@ class UrlSchemesPreprocessor(Preprocessor):
|
||||
return lines
|
||||
|
||||
def replace_relative_link(match: re.Match) -> str:
|
||||
"""
|
||||
Replace relative file links with URLs if they point outside the docs dir.
|
||||
"""
|
||||
"""Replace relative file links pointing outside the docs dir with URLs."""
|
||||
title = match.group("title")
|
||||
path = match.group("path")
|
||||
path = ((DOC_DIR / page.file.src_uri).parent / path).resolve()
|
||||
@@ -91,9 +88,7 @@ class UrlSchemesPreprocessor(Preprocessor):
|
||||
return f"[{gh_icon} {title}]({url})"
|
||||
|
||||
def replace_github_link(match: re.Match) -> str:
|
||||
"""
|
||||
Replace GitHub issue, PR, and project links with enhanced Markdown links.
|
||||
"""
|
||||
"""Replace GitHub issue, PR, and project links with rich Markdown links."""
|
||||
repo = match.group("repo")
|
||||
type = match.group("type")
|
||||
number = match.group("number")
|
||||
|
||||
Reference in New Issue
Block a user