Update pre-commit hook versions to most recent versions (#8343)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig
2025-05-07 23:59:13 -04:00
committed by GitHub
parent d5a8d4251c
commit 689d3c9046
296 changed files with 882 additions and 847 deletions

View File

@@ -167,17 +167,17 @@ class Agent(ABC):
- mcp_tools (list[dict]): The list of MCP tools.
"""
logger.info(
f"Setting {len(mcp_tools)} MCP tools for agent {self.name}: {[tool['function']['name'] for tool in mcp_tools]}"
f'Setting {len(mcp_tools)} MCP tools for agent {self.name}: {[tool["function"]["name"] for tool in mcp_tools]}'
)
for tool in mcp_tools:
_tool = ChatCompletionToolParam(**tool)
if _tool['function']['name'] in self.mcp_tools:
logger.warning(
f"Tool {_tool['function']['name']} already exists, skipping"
f'Tool {_tool["function"]["name"]} already exists, skipping'
)
continue
self.mcp_tools[_tool['function']['name']] = _tool
self.tools.append(_tool)
logger.info(
f"Tools updated for agent {self.name}, total {len(self.tools)}: {[tool['function']['name'] for tool in self.tools]}"
f'Tools updated for agent {self.name}, total {len(self.tools)}: {[tool["function"]["name"] for tool in self.tools]}'
)

View File

@@ -220,7 +220,7 @@ class State:
'trace_version': openhands.__version__,
'tags': [
f'agent:{agent_name}',
f"web_host:{os.environ.get('WEB_HOST', 'unspecified')}",
f'web_host:{os.environ.get("WEB_HOST", "unspecified")}',
f'openhands_version:{openhands.__version__}',
],
}