refactor: enforce BasedPyright strict type checking (#5158)

This commit is contained in:
chengyongru
2026-07-29 21:37:11 +08:00
committed by GitHub
parent e703481755
commit 757ad9c764
166 changed files with 4728 additions and 2621 deletions
+3 -2
View File
@@ -891,7 +891,8 @@ def test_drop_malformed_tool_calls_trims_response():
tool_calls=[
ToolCallRequest(id="1", name=None, arguments={}),
ToolCallRequest(id="2", name="", arguments={}),
ToolCallRequest(id="3", name="read_file", arguments={}),
ToolCallRequest(id="3", name={"unexpected": "object"}, arguments={}),
ToolCallRequest(id="4", name="read_file", arguments={}),
],
finish_reason="tool_calls",
)
@@ -899,7 +900,7 @@ def test_drop_malformed_tool_calls_trims_response():
assert [tc.name for tc in response.tool_calls] == ["read_file"]
assert response.finish_reason == "tool_calls"
assert response.should_execute_tools is True
assert dropped == 2
assert dropped == 3
assert all_dropped is False
assert orig == "tool_calls"