[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
@@ -22,8 +22,7 @@ def test_sanitize_message():
class TestSanitizeMessageFilePaths:
"""sanitize_message should also strip file paths and traceback
frames, not just memory addresses - see #31683.
"""
frames, not just memory addresses - see #31683."""
def test_strips_traceback_style_frame(self):
msg = (
@@ -45,8 +44,7 @@ class TestSanitizeMessageFilePaths:
def test_strips_single_parent_container_path(self):
"""Regression: /app/server.py and /workspace/server.py (common in
container deployments) were missed by the original {2,} quantifier.
"""
container deployments) were missed by the original {2,} quantifier."""
assert "/app/" not in sanitize_message("Error in /app/server.py")
assert "/workspace/" not in sanitize_message("Error in /workspace/server.py")
@@ -24,8 +24,7 @@ from vllm.entrypoints.serve.exception_handling.handlers.validation import (
def _fake_request(log_error_stack: bool = False) -> SimpleNamespace:
"""Minimal stand-in for a FastAPI Request - just enough for the
handler to read req.app.state.args.log_error_stack.
"""
handler to read req.app.state.args.log_error_stack."""
return SimpleNamespace(
app=SimpleNamespace(
state=SimpleNamespace(args=SimpleNamespace(log_error_stack=log_error_stack))
@@ -36,8 +35,7 @@ def _fake_request(log_error_stack: bool = False) -> SimpleNamespace:
class TestValidationErrorParamFallback:
"""Ensure `param` falls back to the Pydantic error's `loc` when no
custom VLLMValidationError context is present.
"""
custom VLLMValidationError context is present."""
@pytest.mark.parametrize(
("error_type", "msg"),
@@ -61,8 +59,7 @@ class TestValidationErrorParamFallback:
async def test_param_fallback_does_not_crash_on_non_dict_error(self):
"""Schemathesis fuzzing found that errors[0] isn't always a dict.
The fallback must not crash in that case - it should just leave
param as None instead of raising.
"""
param as None instead of raising."""
exc = RequestValidationError(["some unexpected non-dict error"])
response = await validation_exception_handler(_fake_request(), exc)
@@ -100,8 +97,7 @@ class TestCleanLocForParam:
def test_all_internal_falls_back_to_raw_join(self):
"""If every loc segment looks internal, fall back to the raw
dot-join rather than returning an empty string.
"""
dot-join rather than returning an empty string."""
loc = ("function-wrap[__log_extra_fields__()]",)
assert clean_loc_for_param(loc) == "function-wrap[__log_extra_fields__()]"
@@ -109,8 +105,7 @@ class TestCleanLocForParam:
class TestValidationErrorDoesNotLeakServerPaths:
"""FastAPI sets endpoint_file/line/function/path on the exception
during routing, not in the constructor - so we set them manually
here to reproduce the real leak. See #31683.
"""
here to reproduce the real leak. See #31683."""
@pytest.mark.asyncio
async def test_handler_strips_endpoint_file_context(self):