chore: strings lint cleanup (#3374)

This commit is contained in:
Andy Li
2025-07-18 09:20:45 -07:00
committed by GitHub
parent 7b7465382b
commit 904d9ba5a2
43 changed files with 71 additions and 86 deletions

View File

@@ -583,7 +583,7 @@ def annotate_message_json_list_with_tool_calls(messages: list[dict], allow_tool_
# If we find a function call w/o a tool call ID annotation, annotate it
if message["role"] == "assistant" and "function_call" in message:
if "tool_call_id" in message and message["tool_call_id"] is not None:
printd(f"Message already has tool_call_id")
printd("Message already has tool_call_id")
tool_call_id = message["tool_call_id"]
else:
tool_call_id = str(uuid.uuid4())
@@ -625,7 +625,7 @@ def annotate_message_json_list_with_tool_calls(messages: list[dict], allow_tool_
assistant_tool_call = message["tool_calls"][0]
if "id" in assistant_tool_call and assistant_tool_call["id"] is not None:
printd(f"Message already has id (tool_call_id)")
printd("Message already has id (tool_call_id)")
tool_call_id = assistant_tool_call["id"]
else:
tool_call_id = str(uuid.uuid4())