Skip to content

Commit 67641a9

Browse files
committed
Fix return type of workflow.wait
1 parent 0995ae0 commit 67641a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

temporalio/workflow.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4486,7 +4486,7 @@ async def wait(
44864486
*,
44874487
timeout: Optional[float] = None,
44884488
return_when: str = asyncio.ALL_COMPLETED,
4489-
) -> Tuple[List[asyncio.Task[AnyType]], set[asyncio.Task[AnyType]]]: ...
4489+
) -> Tuple[List[asyncio.Task[AnyType]], List[asyncio.Task[AnyType]]]: ...
44904490

44914491

44924492
async def wait(
@@ -4505,9 +4505,9 @@ async def wait(
45054505
# but the "set" is changed out for a "list" and fixed up some typing/format
45064506

45074507
if asyncio.isfuture(fs) or asyncio.iscoroutine(fs):
4508-
raise TypeError(f"expect a list of futures, not {type(fs).__name__}")
4508+
raise TypeError(f"Expect an iterable of Tasks/Futures, not {type(fs).__name__}")
45094509
if not fs:
4510-
raise ValueError("Set of Tasks/Futures is empty.")
4510+
raise ValueError("Sequence of Tasks/Futures must not be empty.")
45114511
if return_when not in (
45124512
asyncio.FIRST_COMPLETED,
45134513
asyncio.FIRST_EXCEPTION,
@@ -4534,7 +4534,7 @@ async def _wait(
45344534
# https://github.com/python/cpython/blob/v3.12.3/Lib/asyncio/tasks.py#L522
45354535
# but the "set" is changed out for a "list" and fixed up some typing/format
45364536

4537-
assert fs, "Set of Futures is empty."
4537+
assert fs, "Sequence of Tasks/Futures must not be empty."
45384538
waiter = loop.create_future()
45394539
timeout_handle = None
45404540
if timeout is not None:

0 commit comments

Comments
 (0)