[Docs] Use gen-files for generated docs content (#49587)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-07-25 14:43:21 +00:00
committed by GitHub
parent d1a8ba63d9
commit 3e74c60b9c
34 changed files with 515 additions and 861 deletions
+6 -4
View File
@@ -249,17 +249,19 @@ def get_type_hints(type_hint: TypeHint) -> set[TypeHint]:
NEEDS_HELP = (
any("--help" in arg for arg in sys.argv) # vllm SUBCOMMAND --help
or (argv0 := sys.argv[0]).endswith("mkdocs") # mkdocs SUBCOMMAND
or argv0.endswith("mkdocs/__main__.py") # python -m mkdocs SUBCOMMAND
or "mkdocs" in sys.modules # mkdocs SUBCOMMAND
)
def _maybe_add_docs_url(cls: Any) -> str:
"""Generate API docs URL for a vllm config class."""
if not cls.__module__.startswith("vllm.config"):
import vllm.config
name = cls.__name__
if getattr(vllm.config, name, None) is not cls:
return ""
version = f"v{VLLM_VERSION}" if "dev" not in VLLM_VERSION else "latest"
return f"\n\nAPI docs: https://docs.vllm.ai/en/{version}/api/vllm/config/#vllm.config.{cls.__name__}"
return f"\n\nAPI docs: https://docs.vllm.ai/en/{version}/api/vllm/config/#vllm.config.{name}"
def _expand_json_human_readable_numbers(val: str) -> str: