[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
@@ -1097,8 +1097,7 @@ class TestNonStreamingReasoningPlusToolCalls:
def test_both_extractions_independent(self, parser, request_obj):
"""Calling extract_reasoning then extract_tool_calls on the same
parser instance should both work (each resets the engine).
"""
parser instance should both work (each resets the engine)."""
model_output = FULL_MODEL_OUTPUT
reasoning, _ = parser.extract_reasoning(model_output, request_obj)
@@ -1112,8 +1111,7 @@ class TestNonStreamingReasoningPlusToolCalls:
class TestAdapterExtractReasoning:
"""The reasoning adapter's extract_reasoning uses skip_tool_parsing
so tool call text is preserved as content for the tool adapter.
"""
so tool call text is preserved as content for the tool adapter."""
@pytest.fixture
def adapter(self, mock_tokenizer):
@@ -1154,8 +1152,7 @@ class TestAdapterExtractReasoning:
class TestGemma4SchemaAwareTypeCoercion:
"""Verify that streaming and non-streaming produce identical
type-fixed arguments when tool schemas declare string parameters
but the model outputs bare numbers/booleans.
"""
but the model outputs bare numbers/booleans."""
@pytest.fixture
def tools(self):
@@ -1185,8 +1182,7 @@ class TestGemma4SchemaAwareTypeCoercion:
def test_streaming_string_param_not_coerced(self, parser_with_tools, mock_request):
"""A numeric value for a string-typed param must remain a string
in the streamed output, matching the non-streaming result.
"""
in the streamed output, matching the non-streaming result."""
chunks = [
"<|tool_call>",
"call:update_record{",
@@ -1217,8 +1213,7 @@ class TestGemma4SchemaAwareTypeCoercion:
def test_streaming_matches_non_streaming(self, parser_with_tools, mock_request):
"""Concatenated streaming deltas must produce the same arguments
as non-streaming extraction.
"""
as non-streaming extraction."""
text = "<|tool_call>call:update_record{zipcode:12345}<tool_call|>"
non_streaming = parser_with_tools.extract_tool_calls(text, mock_request)
@@ -1239,8 +1234,7 @@ class TestGemma4SchemaAwareTypeCoercion:
class TestGemma4SchemaCoercionBoolNumberNull:
"""Verify that _fix_arg_types coerces string values to non-string
schema types for the Gemma4 parser.
"""
schema types for the Gemma4 parser."""
@pytest.fixture
def tools(self):
@@ -1301,8 +1295,7 @@ class TestGemma4SchemaCoercionBoolNumberNull:
def test_streaming_type_stability(self, parser_with_tools, mock_request):
"""Values streamed incrementally must not cause prefix
incompatibility when types are coerced.
"""
incompatibility when types are coerced."""
text = (
"<|tool_call>call:configure{"
"enabled:true,"
@@ -1402,8 +1395,7 @@ BARE_THOUGHT_SEQUENCE.append((TOOL_CALL_END_ID, "<tool_call|>"))
class TestBareThoughtWithoutChannelOpener:
"""When the model omits <|channel> and starts with bare ``thought``,
the parser should auto-inject the channel opener so reasoning is
captured correctly.
"""
captured correctly."""
@pytest.fixture
def bare_thought_tokenizer(self):
@@ -1474,8 +1466,7 @@ class TestBareThoughtWithoutChannelOpener:
def test_bare_thought_token_at_end_of_stream(self, request_obj):
"""When the stream ends with just "thought" (no \\n), the parser
should treat it as the thought prefix token, not real reasoning.
"""
should treat it as the thought prefix token, not real reasoning."""
seq: list[tuple[int, str]] = [
(CHANNEL_START_ID, "<|channel>"),
(3000, "thought"),