core: cleanup/sort imports according to ruff check --select I

This commit is contained in:
Dima Gerasimov 2024-08-16 13:25:19 +03:00 committed by karlicoss
parent 7023088d13
commit 7bfce72b7c
45 changed files with 235 additions and 170 deletions

View file

@ -1,10 +1,9 @@
from concurrent.futures import Future, Executor
import sys
from typing import Any, Callable, Optional, TypeVar, TYPE_CHECKING
from concurrent.futures import Executor, Future
from typing import TYPE_CHECKING, Any, Callable, Optional, TypeVar
from ..compat import ParamSpec
_P = ParamSpec('_P')
_T = TypeVar('_T')
@ -15,6 +14,7 @@ class DummyExecutor(Executor):
This is useful if you're already using Executor for parallelising,
but also want to provide an option to run the code serially (e.g. for debugging)
"""
def __init__(self, max_workers: Optional[int] = 1) -> None:
self._shutdown = False
self._max_workers = max_workers