Skip to content

Commit 6aa54dd

Browse files
committed
some cleaning.
1 parent 45215e6 commit 6aa54dd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/pytask_parallel/execute.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def pytask_execute_build(session: Session) -> bool | None: # noqa: C901, PLR091
9696
if not ready_tasks:
9797
sleeper.increment()
9898

99-
for task_name in running_tasks:
99+
for task_name in list(running_tasks):
100100
future = running_tasks[task_name]
101101
if future.done():
102102
warning_reports, task_exception = future.result()
@@ -154,14 +154,10 @@ def pytask_execute_build(session: Session) -> bool | None: # noqa: C901, PLR091
154154

155155

156156
def _parse_future_exception(
157-
exception: BaseException | None,
157+
exc: BaseException | None,
158158
) -> tuple[type[BaseException], BaseException, TracebackType] | None:
159-
"""Parse a future exception."""
160-
return (
161-
None
162-
if exception is None
163-
else (type(exception), exception, exception.__traceback__)
164-
)
159+
"""Parse a future exception into the format of ``sys.exc_info``."""
160+
return None if exc is None else (type(exc), exc, exc.__traceback__)
165161

166162

167163
class ProcessesNameSpace:

0 commit comments

Comments
 (0)