File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import asyncio
44from collections .abc import Awaitable , Callable , Iterable
55import logging
6- from typing import Concatenate , ParamSpec
6+ from typing import Concatenate
77
88log = logging .getLogger (__name__ )
99
@@ -134,10 +134,12 @@ async def main() -> None:
134134
135135 ## -------------------
136136 log .info ("--- Running process executor ---" )
137- from concurrent .futures import ProcessPoolExecutor
137+ from concurrent .futures import Executor , ProcessPoolExecutor
138138
139139 # 2. Create the wrapper
140- async def cpu_worker_wrapper (item , executor : None | ProcessPoolExecutor = None ) -> int :
140+ async def cpu_worker_wrapper (
141+ item : int , executor : Executor | None = None
142+ ) -> int :
141143 loop = asyncio .get_running_loop ()
142144 # Use the passed executor
143145 return await loop .run_in_executor (executor , heavy_cpu_math , item )
Original file line number Diff line number Diff line change 11"""Tests for concurrency utilities."""
22
33import asyncio
4- import logging
5-
6- import pytest
74
85from docbuild .utils .concurrency import TaskFailedError , process_unordered
96
You can’t perform that action at this time.
0 commit comments