From 51d4a107742805971894f933d6d637e8ccc18f42 Mon Sep 17 00:00:00 2001 From: peterychang <49209570+peterychang@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:28:19 -0500 Subject: [PATCH] Fix incorrect type cast (#4620) Co-authored-by: Hussein Mozannar --- .../src/autogen_agentchat/agents/_user_proxy_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py index 35aa5fa88a8d..3604b82503b7 100644 --- a/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py +++ b/python/packages/autogen-agentchat/src/autogen_agentchat/agents/_user_proxy_agent.py @@ -18,7 +18,7 @@ # TODO: ainput doesn't seem to play nicely with jupyter. # No input window appears in this case. async def cancellable_input(prompt: str, cancellation_token: Optional[CancellationToken]) -> str: - task = asyncio.Task[str](asyncio.create_task(ainput(prompt))) # type: ignore + task: asyncio.Task[str] = asyncio.create_task(ainput(prompt)) # type: ignore if cancellation_token is not None: cancellation_token.link_future(task) return await task