[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
+9 -18
View File
@@ -33,8 +33,7 @@ def _render(template, messages, **kwargs):
class TestGemma4ChatTemplate:
def test_basic_multiturn_thinking_disabled(self, gemma4_template):
"""With enable_thinking=False (default), generation prompt ends with
an empty thought channel to suppress thinking.
"""
an empty thought channel to suppress thinking."""
messages = [
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hi there!"},
@@ -50,8 +49,7 @@ class TestGemma4ChatTemplate:
def test_basic_multiturn_thinking_enabled(self, gemma4_template):
"""With enable_thinking=True, generation prompt ends with model
turn opener (no thought suppression).
"""
turn opener (no thought suppression)."""
messages = [
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hi there!"},
@@ -146,8 +144,7 @@ class TestGemma4ChatTemplate:
def test_tool_responses_openai_style(self, gemma4_template):
"""role='tool' messages are formatted as <|tool_response> blocks
with content dumped as-is.
"""
with content dumped as-is."""
messages = [
{"role": "user", "content": "Weather?"},
{
@@ -205,8 +202,7 @@ class TestGemma4ChatTemplate:
def test_generation_prompt_not_after_tool_response(self, gemma4_template):
"""add_generation_prompt=True should NOT add <|turn>model when the
last message type was tool_response (the model turn continues).
"""
last message type was tool_response (the model turn continues)."""
messages = [
{"role": "user", "content": "Weather?"},
{
@@ -233,8 +229,7 @@ class TestGemma4ChatTemplate:
def test_reasoning_in_tool_chains(self, gemma4_template):
"""Reasoning field on assistant with tool_calls after last user
message emits <|channel>thought\\n...<channel|>.
"""
message emits <|channel>thought\\n...<channel|>."""
messages = [
{"role": "user", "content": "Calculate something"},
{
@@ -280,8 +275,7 @@ class TestGemma4ChatTemplate:
def test_strip_thinking_in_model_content(self, gemma4_template):
"""<|channel>...<channel|> in model content is stripped by the
strip_thinking macro.
"""
strip_thinking macro."""
messages = [
{"role": "user", "content": "Hi"},
{
@@ -295,8 +289,7 @@ class TestGemma4ChatTemplate:
def test_multi_turn_tool_chain(self, gemma4_template):
"""assistant->tool->assistant->tool produces exactly one
<|turn>model (later assistants continue the same turn).
"""
<|turn>model (later assistants continue the same turn)."""
messages = [
{"role": "user", "content": "Do two things"},
{
@@ -353,8 +346,7 @@ class TestGemma4ChatTemplate:
def test_tool_response_with_multimodal_content(self, gemma4_template):
"""Multimodal placeholders in tool messages are emitted after the
tool_response block.
"""
tool_response block."""
messages = [
{"role": "user", "content": "Download the image and describe it."},
{
@@ -388,8 +380,7 @@ class TestGemma4ChatTemplate:
def test_tool_response_with_all_modalities(self, gemma4_template):
"""All multimodal types (image, audio, video) in a single tool
response are rendered.
"""
response are rendered."""
messages = [
{"role": "user", "content": "Process media"},
{