[CI] Fix pre-commit mypy issue in main (#36049)

This commit is contained in:
Wentao Ye
2026-03-04 21:13:12 -05:00
committed by GitHub
parent 792cbd64ca
commit 2f4226fe52

View File

@@ -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