[CI] Ignore ruff D209, rejoin the docstrings it split, and silence incompatible-rule warnings (#57212)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-16 10:57:24 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 1085b64425
commit 651a88c09a
693 changed files with 2088 additions and 4171 deletions
@@ -36,13 +36,11 @@ def test_should_include_usage_force_enables_continuous_usage(stream_options, exp
class TestGetMaxTokens:
"""Tests for get_max_tokens() to ensure generation_config's max_tokens
acts as a default when from model author, and as a ceiling when
explicitly set by the user.
"""
explicitly set by the user."""
def test_default_sampling_params_used_when_no_request_max_tokens(self):
"""When user doesn't specify max_tokens, generation_config default
should apply.
"""
should apply."""
result = get_max_tokens(
max_model_len=24000,
max_tokens=None,
@@ -53,8 +51,7 @@ class TestGetMaxTokens:
def test_request_max_tokens_not_capped_by_default_sampling_params(self):
"""When user specifies max_tokens in request, model author's
generation_config max_tokens must NOT cap it (fixes #34005).
"""
generation_config max_tokens must NOT cap it (fixes #34005)."""
result = get_max_tokens(
max_model_len=24000,
max_tokens=5000,
@@ -97,8 +94,7 @@ class TestGetMaxTokens:
def test_request_max_tokens_smaller_than_default(self):
"""When user explicitly requests fewer tokens than gen_config default,
that should be respected.
"""
that should be respected."""
result = get_max_tokens(
max_model_len=24000,
max_tokens=512,
@@ -239,8 +239,7 @@ def test_request_logger_log_outputs_integration():
def test_streaming_complete_logs_full_text_content():
"""Test that streaming complete logging includes
full accumulated text, not just token count.
"""
full accumulated text, not just token count."""
mock_logger = MagicMock()
with patch("vllm.entrypoints.serve.utils.request_logger.logger", mock_logger):
@@ -17,8 +17,7 @@ from vllm.entrypoints.serve.utils.sse_keep_alive import (
def test_disabled_returns_same_generator():
"""For 0, negative, and NaN intervals the exact same generator object must
be returned (identity), proving no wrapper or per-chunk overhead when
disabled.
"""
disabled."""
async def gen():
yield "x"
@@ -34,8 +33,7 @@ def test_disabled_returns_same_generator():
@pytest.mark.asyncio
async def test_keep_alive_during_silent_start():
"""A silent start (queue wait / prefill) emits keep-alive comments before
the first real chunk.
"""
the first real chunk."""
release = asyncio.Event()
async def gen():
@@ -57,8 +55,7 @@ async def test_keep_alive_during_silent_start():
@pytest.mark.asyncio
async def test_no_keep_alive_when_streaming_is_fast():
"""If chunks arrive faster than the interval, no comment is emitted and all
data is forwarded.
"""
data is forwarded."""
async def gen():
for chunk in ["a", "b", "c"]:
@@ -72,8 +69,7 @@ async def test_no_keep_alive_when_streaming_is_fast():
@pytest.mark.asyncio
async def test_keep_alive_between_chunks_does_not_drop_data():
"""Keep-alives interleaved with real chunks must never drop or reorder
data.
"""
data."""
release_b = asyncio.Event()
release_c = asyncio.Event()
@@ -139,8 +135,7 @@ async def test_upstream_cancelled_error_propagates():
@pytest.mark.asyncio
async def test_aclose_closes_upstream():
"""Closing a wrapper that is mid-stream must complete promptly and close
the upstream generator (regression for the earlier leaked-task hang).
"""
the upstream generator (regression for the earlier leaked-task hang)."""
finalized = asyncio.Event()
async def gen():
@@ -159,8 +154,7 @@ async def test_aclose_closes_upstream():
@pytest.mark.asyncio
async def test_client_disconnect_cancels_upstream():
"""Cancelling the consumer mid-stream must cancel the pending anext and
close the upstream generator so its cleanup runs.
"""
close the upstream generator so its cleanup runs."""
finalized = asyncio.Event()
async def gen():
@@ -187,8 +181,7 @@ async def test_client_disconnect_cancels_upstream():
@pytest.mark.asyncio
async def test_streaming_response_emits_comment():
"""A keep-alive comment must reach the client through the real
StreamingResponse used by the routers.
"""
StreamingResponse used by the routers."""
release = asyncio.Event()
async def gen():
@@ -227,8 +220,7 @@ async def test_streaming_response_emits_comment():
async def test_streaming_response_disconnect_closes_upstream():
"""On the ASGI 2.3 disconnect path used by the pinned Uvicorn, Starlette
cancels streaming and the wrapper's finally must close the upstream
generator.
"""
generator."""
finalized = asyncio.Event()
async def gen():