Skip to content

Commit c325d86

Browse files
committed
Fix Ruff errors
1 parent 4b02d03 commit c325d86

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/docbuild/utils/concurrency.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import asyncio
44
from collections.abc import Awaitable, Callable, Iterable
55
import logging
6-
from typing import Concatenate, ParamSpec
6+
from typing import Concatenate
77

88
log = 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)

tests/utils/test_concurrency.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
"""Tests for concurrency utilities."""
22

33
import asyncio
4-
import logging
5-
6-
import pytest
74

85
from docbuild.utils.concurrency import TaskFailedError, process_unordered
96

0 commit comments

Comments
 (0)