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:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
This script demonstrates how to use the vLLM API server to perform audio
"""This script demonstrates how to use the vLLM API server to perform audio
transcription with the `openai/whisper-large-v3` model.
Before running this script, you must start the vLLM server with the following command:
@@ -35,8 +34,7 @@ def sync_openai(
hotwords: str = None,
prompt: str | None = None,
):
"""
Perform synchronous transcription using OpenAI-compatible API.
"""Perform synchronous transcription using OpenAI-compatible API.
The optional ``prompt`` is the OpenAI-API ``prompt`` field (style /
vocabulary hint). It is wired through model-by-model: Whisper uses it
@@ -69,9 +67,7 @@ async def stream_openai_response(
hotwords: str = None,
prompt: str | None = None,
):
"""
Perform asynchronous transcription using OpenAI-compatible API.
"""
"""Perform asynchronous transcription using OpenAI-compatible API."""
print("\ntranscription result [stream]:", end=" ")
with open(audio_path, "rb") as f:
transcription = await client.audio.transcriptions.create(
@@ -98,9 +94,7 @@ async def stream_openai_response(
def stream_api_response(audio_path: str, model: str, openai_api_base: str):
"""
Perform streaming transcription using raw HTTP requests to the vLLM API server.
"""
"""Stream a transcription using raw HTTP requests to the vLLM API server."""
import json
import os