Skip to content

Commit

Permalink
ConcurrentMappingIterable: fix generic typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Sep 28, 2024
1 parent 07bc404 commit 3856834
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions streamable/iters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Coroutine,
DefaultDict,
Deque,
Generic,
Iterable,
Iterator,
List,
Expand Down Expand Up @@ -329,7 +330,7 @@ def __next__(self) -> T:


class ConcurrentMappingIterable(
ABC, Iterable[Union[U, RaisingIterator.ExceptionContainer]]
Generic[T, U], ABC, Iterable[Union[U, RaisingIterator.ExceptionContainer]]
):
"""
Template Method Pattern:
Expand Down Expand Up @@ -382,7 +383,7 @@ def __iter__(self) -> Iterator[Union[U, RaisingIterator.ExceptionContainer]]:
break


class ThreadConcurrentMappingIterable(ConcurrentMappingIterable[U]):
class ThreadConcurrentMappingIterable(ConcurrentMappingIterable[T, U]):
def __init__(
self,
iterator: Iterator[T],
Expand Down Expand Up @@ -418,7 +419,7 @@ def _get_future_result(
return future.result()


class AsyncConcurrentMappingIterable(ConcurrentMappingIterable[U]):
class AsyncConcurrentMappingIterable(ConcurrentMappingIterable[T, U]):
def __init__(
self,
iterator: Iterator[T],
Expand Down

0 comments on commit 3856834

Please sign in to comment.