Modernise
This commit is contained in:
parent
4c6441182b
commit
8faee98ec6
44 changed files with 214 additions and 201 deletions
|
|
@ -39,11 +39,9 @@ def manage_communication(
|
|||
is_iteration_over = True
|
||||
except Exception as e:
|
||||
if ignore_exceptions:
|
||||
logger.error(
|
||||
f"""Exception {e} encountered in input, traceback:\n{
|
||||
logger.error(f"""Exception {e} encountered in input, traceback:\n{
|
||||
traceback.format_exc()
|
||||
}"""
|
||||
)
|
||||
}""")
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ def parallel_map(
|
|||
chunk_size: Optional[int] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[Optional[V]]:
|
||||
...
|
||||
) -> Iterable[Optional[V]]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -44,8 +43,7 @@ def parallel_map(
|
|||
ignore_exceptions: Literal[True],
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[Optional[V]]:
|
||||
...
|
||||
) -> Iterable[Optional[V]]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -57,8 +55,7 @@ def parallel_map(
|
|||
ignore_exceptions: Literal[False] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[V]:
|
||||
...
|
||||
) -> Iterable[V]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -70,8 +67,7 @@ def parallel_map(
|
|||
ignore_exceptions: Literal[False] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[V]:
|
||||
...
|
||||
) -> Iterable[V]: ...
|
||||
|
||||
|
||||
def parallel_map(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Awaitable, Callable, List, Optional, Sequence, TypeVar, Union
|
||||
|
||||
from tqdm.cli import tqdm
|
||||
from tqdm import tqdm
|
||||
|
||||
from .parallel_map import parallel_map
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ def threaded_parallel_map(
|
|||
chunk_size: Optional[int] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[Optional[V]]:
|
||||
...
|
||||
) -> Iterable[Optional[V]]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -43,8 +42,7 @@ def threaded_parallel_map(
|
|||
ignore_exceptions: Literal[True],
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[Optional[V]]:
|
||||
...
|
||||
) -> Iterable[Optional[V]]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -56,8 +54,7 @@ def threaded_parallel_map(
|
|||
ignore_exceptions: Literal[False] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[V]:
|
||||
...
|
||||
) -> Iterable[V]: ...
|
||||
|
||||
|
||||
@overload
|
||||
|
|
@ -69,8 +66,7 @@ def threaded_parallel_map(
|
|||
ignore_exceptions: Literal[False] = ...,
|
||||
concurrency: Optional[int] = ...,
|
||||
unordered: bool = ...,
|
||||
) -> Iterable[V]:
|
||||
...
|
||||
) -> Iterable[V]: ...
|
||||
|
||||
|
||||
def threaded_parallel_map(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue