From 0fb862ad49922867d88332474dd21cbbc65ccfb8 Mon Sep 17 00:00:00 2001 From: Shriyansh Agnihotri Date: Mon, 20 Jan 2025 22:23:17 +0530 Subject: [PATCH] using Union instead of | to make the mypy test pass --- autogen/messages/agent_messages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen/messages/agent_messages.py b/autogen/messages/agent_messages.py index 22e827cf3f..a054936072 100644 --- a/autogen/messages/agent_messages.py +++ b/autogen/messages/agent_messages.py @@ -4,7 +4,7 @@ from abc import ABC from copy import deepcopy -from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Union +from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Union from uuid import UUID from pydantic import BaseModel @@ -189,7 +189,7 @@ def print(self, f: Optional[Callable[..., Any]] = None) -> None: @wrap_message class TextMessage(BasePrintReceivedMessage): - content: Optional[Union[str, int, float, bool, list[dict[str, str | dict[str, Any]]]]] = None # type: ignore [assignment] + content: Optional[Union[str, int, float, bool, List[Dict[str, Union[str, Dict[str, Any]]]]]] = None # type: ignore [assignment] def print(self, f: Optional[Callable[..., Any]] = None) -> None: f = f or print