Skip to content

Commit eb03730

Browse files
John-Linclaude
andcommitted
Fix mypy type error on mcp_servers list
Add explicit union type annotation so mypy accepts both MCPServerStreamableHttp and MCPServerStdio in the same list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 120faea commit eb03730

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bot/agents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def truncate_history(self, chat_id: int) -> None:
8888

8989
@classmethod
9090
def from_dict(cls, name: str, config: dict[str, Any]) -> OpenAIAgent:
91-
mcp_servers = []
91+
mcp_servers: list[MCPServerStreamableHttp | MCPServerStdio] = []
9292
for mcp_srv in config.get("mcpServers", {}).values():
9393
if "httpUrl" in mcp_srv:
9494
mcp_servers.append(

0 commit comments

Comments
 (0)