Skip to content

Commit c3426ce

Browse files
authored
Fix return type of workflow.wait (#650)
1 parent a46a742 commit c3426ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

temporalio/workflow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,7 +4975,7 @@ async def wait(
49754975
*,
49764976
timeout: Optional[float] = None,
49774977
return_when: str = asyncio.ALL_COMPLETED,
4978-
) -> Tuple[List[asyncio.Task[AnyType]], set[asyncio.Task[AnyType]]]: ...
4978+
) -> Tuple[List[asyncio.Task[AnyType]], List[asyncio.Task[AnyType]]]: ...
49794979

49804980

49814981
async def wait(
@@ -4994,9 +4994,9 @@ async def wait(
49944994
# but the "set" is changed out for a "list" and fixed up some typing/format
49954995

49964996
if asyncio.isfuture(fs) or asyncio.iscoroutine(fs):
4997-
raise TypeError(f"expect a list of futures, not {type(fs).__name__}")
4997+
raise TypeError(f"Expect an iterable of Tasks/Futures, not {type(fs).__name__}")
49984998
if not fs:
4999-
raise ValueError("Set of Tasks/Futures is empty.")
4999+
raise ValueError("Sequence of Tasks/Futures must not be empty.")
50005000
if return_when not in (
50015001
asyncio.FIRST_COMPLETED,
50025002
asyncio.FIRST_EXCEPTION,
@@ -5023,7 +5023,7 @@ async def _wait(
50235023
# https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L522
50245024
# but the "set" is changed out for a "list" and fixed up some typing/format
50255025

5026-
assert fs, "Set of Futures is empty."
5026+
assert fs, "Sequence of Tasks/Futures must not be empty."
50275027
waiter = loop.create_future()
50285028
timeout_handle = None
50295029
if timeout is not None:

0 commit comments

Comments
 (0)