[MyPy][1/N] Fix mypy errors in some tests/ directories and enforce follow-imports=silent (#49570)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
Harry Mellor
parent
89d97d9a16
commit
38a267cdd5
@@ -261,7 +261,7 @@ def test_mistral_function_calling(vllm_runner, model: str, dtype: str) -> None:
|
||||
|
||||
model_output = outputs[0].outputs[0].text.strip()
|
||||
assert model_output.startswith(tool_parser.bot_token), model_output
|
||||
parsed_message = tool_parser.extract_tool_calls(model_output, None)
|
||||
parsed_message = tool_parser.extract_tool_calls(model_output, None) # type: ignore[arg-type]
|
||||
|
||||
assert parsed_message.tools_called
|
||||
|
||||
@@ -304,7 +304,7 @@ def test_mistral_function_call_nested_json():
|
||||
|
||||
model_output = f"{parser.bot_token}get_current_weather{json.dumps(args_dict)}"
|
||||
|
||||
parsed = parser.extract_tool_calls(model_output, None)
|
||||
parsed = parser.extract_tool_calls(model_output, None) # type: ignore[arg-type]
|
||||
|
||||
# Assertions: the tool call is detected and the full nested JSON is parsed
|
||||
# without truncation.
|
||||
@@ -337,7 +337,7 @@ def test_mistral_function_call_nested_json():
|
||||
]
|
||||
)
|
||||
|
||||
parsed = parser.extract_tool_calls(model_output, None)
|
||||
parsed = parser.extract_tool_calls(model_output, None) # type: ignore[arg-type]
|
||||
|
||||
# Assertions: the tool call is detected and the full nested JSON is parsed
|
||||
# without truncation.
|
||||
|
||||
Reference in New Issue
Block a user