From 187c3dc72f453b6e73c121e47a4886b8b9c48b78 Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Fri, 5 Jul 2024 11:15:55 +0200 Subject: [PATCH] DOC: fix return value of run_tasks() (#150) --- audeer/core/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/audeer/core/utils.py b/audeer/core/utils.py index e4cabb4..f66397b 100644 --- a/audeer/core/utils.py +++ b/audeer/core/utils.py @@ -541,7 +541,7 @@ def run_tasks( multiprocessing: bool = False, progress_bar: bool = False, task_description: str = None, -) -> typing.Sequence[typing.Any]: +) -> typing.List[typing.Any]: r"""Run parallel tasks using multprocessing. .. note:: Result values are returned in order of ``params``. @@ -563,6 +563,9 @@ def run_tasks( task_description: task description that will be displayed next to progress bar + Returns: + list of computed results + Examples: >>> power = lambda x, n: x**n >>> params = [([2, n], {}) for n in range(10)]