Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion celery-stubs/result.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class AsyncResult(ResultBase, Generic[_R_co]):
def maybe_reraise(
self, propagate: bool = ..., callback: Callable[..., Any] | None = ...
) -> None: ...
def as_list(self) -> list[AsyncResult[Any]]: ...
def as_list(self) -> list[str]: ...
def wait(
self,
timeout: float | None = ...,
Expand Down
4 changes: 4 additions & 0 deletions tests/test_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,7 @@ def test_djangotask(task: DjangoTask[[int, int], Any]) -> None:

def test_abortabletask(task: AbortableTask[[], None]) -> None:
task.is_aborted()


def test_async_result_as_list(result: AsyncResult[None]) -> None:
assert_type(result.as_list(), list[str])