[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
+6 -12
View File
@@ -334,8 +334,7 @@ class TestMissingToolCallsWrapper:
):
"""Text after a tool block is dropped whether or not the closing
wrapper is present, so a missing ``</|DSML|tool_calls>`` does not
change what the client sees.
"""
change what the client sees."""
text = "pre\n" + self._ORPHAN
if trailing_end:
text += DSML_TOOL_END
@@ -916,8 +915,7 @@ class TestParallelUnwrapping:
class TestStreamingWrapperConsistency:
"""Streamed arg deltas must stay consistent with final extraction
when wrapper params like 'arguments' are unwrapped.
"""
when wrapper params like 'arguments' are unwrapped."""
def test_streaming_wrapper_unwrap_consistency(self, mock_tokenizer, mock_request):
tool = _make_tool("get_weather", {"location": {"type": "string"}})
@@ -1198,8 +1196,7 @@ class TestDelegatingParserLargeDelta:
)
def test_eos_not_leaked_when_reasoning_never_ends(self, chunk_size):
"""EOS must not leak into reasoning_content when the model never
emits </think> (generation ends while still in REASONING state).
"""
emits </think> (generation ends while still in REASONING state)."""
eos_text = "<|end▁of▁sentence|>"
eos_id = 128801
vocab = {
@@ -1288,8 +1285,7 @@ class TestMalformedDsmlNoise:
self, mock_tokenizer, mock_request, wrapper
):
"""Like the real wrapper, a corrupted one inside ``<think>`` closes
the reasoning block and starts the tool call.
"""
the reasoning block and starts the tool call."""
text = f"thinking{wrapper}\n{self._INNER}"
parser = self._parser(mock_tokenizer, thinking=True)
reasoning, content = parser.extract_reasoning(text, mock_request)
@@ -1333,8 +1329,7 @@ class TestMalformedDsmlNoise:
prose mention of the real wrapper: the opener starts a tool block and
the rest of the message is dropped. That is pre-existing behavior of
``<|DSML|tool_calls>``; the variants must not differ from it either
way.
"""
way."""
template = "The opener looks like {} and then params follow. Done."
text = template.format(wrapper)
reference = template.format(DSML_TOOL_START)
@@ -1358,8 +1353,7 @@ class TestMalformedDsmlNoise:
@pytest.mark.parametrize("chunk_size", [1, 3, None], ids=lambda c: f"chunk={c}")
def test_delegating_parser_corrupted_wrapper(self, wrapper, chunk_size):
"""The serving-layer shape: reasoning and tool adapters on separate
engines, with the corrupted opener arriving as plain text.
"""
engines, with the corrupted opener arriving as plain text."""
tokens = _dsv4_tokens(
reasoning="Checking the weather.",
tool_name="get_weather",