Skip to content

Commit

Permalink
using Union instead of | to make the mypy test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Shriyansh Agnihotri committed Jan 20, 2025
1 parent 9fce296 commit 0fb862a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autogen/messages/agent_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0fb862a

Please sign in to comment.