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,8 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Unit tests for the breakable cudagraph primitives.
"""
"""Unit tests for the breakable cudagraph primitives."""
from __future__ import annotations
@@ -82,7 +80,8 @@ def test_piecewise_capture_builds_fresh_metadata_for_both_passes():
@pytest.fixture(autouse=True)
def _reset_breakable_tls():
"""Defensively clear thread-local capture state between tests so a
failure in one test can't leak "nested capture" errors into the next."""
failure in one test can't leak "nested capture" errors into the next.
"""
from vllm.compilation.breakable_cudagraph import BreakableCUDAGraphCapture
BreakableCUDAGraphCapture._tls.active = None
@@ -292,7 +291,8 @@ def test_capture_replay_matches_eager_simple(cuda_capture_stream):
def test_decorator_breaks_when_invoked_inside_capture(cuda_capture_stream):
"""Verify @eager_break_during_capture correctly routes through
add_eager when inside a capture context, and runs straight through
when there's no active capture."""
when there's no active capture.
"""
from vllm.compilation.breakable_cudagraph import (
BreakableCUDAGraphCapture,
eager_break_during_capture,
@@ -554,7 +554,8 @@ def _mock_vllm_config():
def test_wrapper_falls_through_on_runtime_mode_mismatch():
"""A PIECEWISE-scoped wrapper runs other modes eagerly, capturing
nothing, so an outer CUDAGraphWrapper can own them."""
nothing, so an outer CUDAGraphWrapper can own them.
"""
from vllm.compilation.breakable_cudagraph import BreakableCUDAGraphWrapper
from vllm.config import CUDAGraphMode
from vllm.forward_context import BatchDescriptor, set_forward_context
@@ -376,7 +376,6 @@ def _run_and_monitor_call(
wrapper, input_tensor, runtime_mode, batch_descriptor, vllm_config
):
"""Helper to run a single call and monitor the action."""
with (
patch("torch.cuda.graph", wraps=torch.cuda.graph) as mock_graph_context,
patch.object(wrapper, "runnable", wraps=wrapper.runnable) as mock_runnable,