From fe947010d01e8ce184ed610120013f2828611ed4 Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Thu, 20 Jun 2024 22:37:19 +0300 Subject: [PATCH] fix: Make list asynchronous for the async manager --- sdks/python/julep/managers/task.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sdks/python/julep/managers/task.py b/sdks/python/julep/managers/task.py index 3a0b59fd4..1cb81ffcf 100644 --- a/sdks/python/julep/managers/task.py +++ b/sdks/python/julep/managers/task.py @@ -391,7 +391,7 @@ class AsyncTasksManager(BaseTasksManager): Execution: A newly created execution object list(self, agent_id: Union[UUID, str]) -> List[Task]: - Retrieves a list of tasks. + Asynchronously retrieves a list of tasks. Args: agent_id (Union[UUID, str]): Agent ID @@ -402,7 +402,7 @@ class AsyncTasksManager(BaseTasksManager): @beartype async def list(self, agent_id: Union[UUID, str]) -> List[Task]: """ - Retrieves a list of tasks. + Asynchronously retrieves a list of tasks. Args: agent_id (Union[UUID, str]): Agent ID @@ -411,11 +411,8 @@ async def list(self, agent_id: Union[UUID, str]) -> List[Task]: """ assert is_valid_uuid4(agent_id) - return cast( - List[Task], - self._list( - agent_id=agent_id, - ), + return await self._list( + agent_id=agent_id, ) @beartype