From 2f4226fe5280b60c47b4f6f01d9b18ac9cda2038 Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Wed, 4 Mar 2026 21:13:12 -0500 Subject: [PATCH] [CI] Fix pre-commit mypy issue in main (#36049) --- vllm/tool_parsers/hermes_tool_parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm/tool_parsers/hermes_tool_parser.py b/vllm/tool_parsers/hermes_tool_parser.py index 992590525..37fa6bd66 100644 --- a/vllm/tool_parsers/hermes_tool_parser.py +++ b/vllm/tool_parsers/hermes_tool_parser.py @@ -329,11 +329,12 @@ class Hermes2ProToolParser(ToolParser): logger.debug("unable to parse JSON") return None + if current_tool_call is None: + return None + # case - we haven't sent the tool name yet. If it's available, send # it. otherwise, wait until it's available. if not self.current_tool_name_sent: - if current_tool_call is None: - return None function_name: str | None = current_tool_call.get("name") if function_name: self.current_tool_name_sent = True