[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
@@ -276,8 +276,7 @@ def _reference_is_reasoning_end(input_ids: list[int]) -> bool:
def test_is_reasoning_end_streaming_only_scans_the_step_window():
"""The decode-step check must not re-derive the answer from the whole
sequence: an already-closed think block earlier in the sequence is the
engine's business (it latches `reasoning_ended`), not this call's.
"""
engine's business (it latches `reasoning_ended`), not this call's."""
parser = KimiK3ReasoningParser(DummyTokenizer())
prompt = [*CLOSE_IDS, *OPEN_IDS, 9, 9, 9]
@@ -287,8 +286,7 @@ def test_is_reasoning_end_streaming_only_scans_the_step_window():
def test_is_reasoning_end_streaming_detects_marker_across_step_boundary():
"""A 3-token marker can be split over decode steps; the check carries the
preceding len(marker)-1 tokens so the final token still completes it.
"""
preceding len(marker)-1 tokens so the final token still completes it."""
parser = KimiK3ReasoningParser(DummyTokenizer())
history = [*OPEN_IDS, 5, *CLOSE_IDS[:2]]
@@ -299,8 +297,7 @@ def test_is_reasoning_end_streaming_detects_marker_across_step_boundary():
def test_is_reasoning_end_streaming_reopened_block_is_not_ended():
"""Kimi K3 may close and immediately reopen the think channel inside one
window (speculative decoding lands several tokens per step). The newest
marker wins, matching is_reasoning_end.
"""
marker wins, matching is_reasoning_end."""
parser = KimiK3ReasoningParser(DummyTokenizer())
window = [*CLOSE_IDS, *OPEN_IDS]
@@ -327,8 +324,7 @@ def test_is_reasoning_end_streaming_thinking_disabled():
def test_reasoning_end_matches_reference_over_marker_dense_sequences(seed):
"""Both the full-sequence check and the per-step check must agree with the
two-scan reference, on sequences where the markers (which share the suffix
[2, 3]) collide and overlap constantly.
"""
[2, 3]) collide and overlap constantly."""
import random
rnd = random.Random(seed)