style: drop redundant comment and add Final on #45470 regression test

Address greptile review on PR #45478: remove explanatory comments and annotate new test locals with Final per AGENTS.md.
This commit is contained in:
er-s-an 2026-10-09 17:05:18 +08:00
parent 561951e317
commit 4c1cc99d3e
2 changed files with 2 additions and 4 deletions

View file

@ -288,8 +288,6 @@ class LiteLLMAnthropicToResponsesAPIAdapter:
},
)
if btype == "text":
# Emit text in block order so text before/after tool_use is not
# replayed as one trailing assistant message (#45470).
return (
{
"type": "message",

View file

@ -673,7 +673,7 @@ class TestTranslateMessagesToResponsesInput:
def test_assistant_text_before_and_after_tool_use_preserves_order(self):
"""Text around tool_use stays in block order, not replayed after (#45470)."""
messages = [
messages: Final = [
{"role": "user", "content": "weather in Paris?"},
{
"role": "assistant",
@ -695,7 +695,7 @@ class TestTranslateMessagesToResponsesInput:
],
},
]
result = _translate_messages(messages)
result: Final = _translate_messages(messages)
assert [item["type"] for item in result] == [
"message",
"message",