From 5f141f7712b0c7f3d1ae1523df75fe031e18fd99 Mon Sep 17 00:00:00 2001 From: Ray Myers Date: Thu, 17 Jul 2025 11:10:16 -0500 Subject: [PATCH] Fix type hint: add | None to first element of create_default_mcp_server_config return tuple (#9754) Co-authored-by: openhands --- openhands/core/config/mcp_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openhands/core/config/mcp_config.py b/openhands/core/config/mcp_config.py index 882b96d892..b952b6fe00 100644 --- a/openhands/core/config/mcp_config.py +++ b/openhands/core/config/mcp_config.py @@ -190,7 +190,7 @@ class OpenHandsMCPConfig: @staticmethod def create_default_mcp_server_config( host: str, config: 'OpenHandsConfig', user_id: str | None = None - ) -> tuple[MCPSHTTPServerConfig, list[MCPStdioServerConfig]]: + ) -> tuple[MCPSHTTPServerConfig | None, list[MCPStdioServerConfig]]: """ Create a default MCP server configuration. @@ -198,7 +198,7 @@ class OpenHandsMCPConfig: host: Host string config: OpenHandsConfig Returns: - tuple[MCPSSEServerConfig, list[MCPStdioServerConfig]]: A tuple containing the default SSE server configuration and a list of MCP stdio server configurations + tuple[MCPSHTTPServerConfig | None, list[MCPStdioServerConfig]]: A tuple containing the default SHTTP server configuration (or None) and a list of MCP stdio server configurations """ stdio_servers = [] search_engine_stdio_server = OpenHandsMCPConfig.add_search_engine(config)