Skip to content

Commit f60df78

Browse files
committed
make mypy
1 parent 9847585 commit f60df78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_openai_chatcompletions_converter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def test_tool_call_with_valid_json_arguments():
393393

394394
messages = Converter.items_to_messages([function_call])
395395
tool_call = messages[0]["tool_calls"][0] # type: ignore
396-
assert tool_call["function"]["arguments"] == '{"key": "value", "number": 42}' # type: ignore
396+
assert tool_call["function"]["arguments"] == '{"key": "value", "number": 42}'
397397

398398

399399
def test_tool_call_with_invalid_json_arguments():
@@ -414,7 +414,7 @@ def test_tool_call_with_invalid_json_arguments():
414414
messages = Converter.items_to_messages([function_call])
415415
tool_call = messages[0]["tool_calls"][0] # type: ignore
416416
# Invalid JSON should be sanitized to "{}"
417-
assert tool_call["function"]["arguments"] == "{}" # type: ignore
417+
assert tool_call["function"]["arguments"] == "{}"
418418

419419
# Test with None
420420
function_call_none = ResponseFunctionToolCallParam(
@@ -427,7 +427,7 @@ def test_tool_call_with_invalid_json_arguments():
427427

428428
messages_none = Converter.items_to_messages([function_call_none])
429429
tool_call_none = messages_none[0]["tool_calls"][0] # type: ignore
430-
assert tool_call_none["function"]["arguments"] == "{}" # type: ignore
430+
assert tool_call_none["function"]["arguments"] == "{}"
431431

432432
# Test with empty string
433433
function_call_empty = ResponseFunctionToolCallParam(
@@ -440,7 +440,7 @@ def test_tool_call_with_invalid_json_arguments():
440440

441441
messages_empty = Converter.items_to_messages([function_call_empty])
442442
tool_call_empty = messages_empty[0]["tool_calls"][0] # type: ignore
443-
assert tool_call_empty["function"]["arguments"] == "{}" # type: ignore
443+
assert tool_call_empty["function"]["arguments"] == "{}"
444444

445445

446446
def test_tool_call_with_malformed_json_variants():
@@ -469,7 +469,7 @@ def test_tool_call_with_malformed_json_variants():
469469
messages = Converter.items_to_messages([function_call])
470470
tool_call = messages[0]["tool_calls"][0] # type: ignore
471471
# All malformed JSON should be sanitized to "{}"
472-
assert tool_call["function"]["arguments"] == "{}", ( # type: ignore
472+
assert tool_call["function"]["arguments"] == "{}", (
473473
f"Malformed JSON '{malformed_json}' should be sanitized to '{{}}'"
474474
)
475475

0 commit comments

Comments
 (0)