77from collections import defaultdict , deque
88from concurrent .futures import Executor , ThreadPoolExecutor
99from typing import (
10- Any ,
1110 AsyncIterable ,
1211 AsyncIterator ,
1312 Awaitable ,
@@ -133,9 +132,9 @@ def __init__(
133132 self ,
134133 iterator : AsyncIterator [T ],
135134 errors : Union [Type [Exc ], Tuple [Type [Exc ], ...]],
136- where : Optional [AsyncFunction [Exc , Any ]],
135+ where : Optional [AsyncFunction [Exc , object ]],
137136 replace : Optional [AsyncFunction [Exc , U ]],
138- do : Optional [AsyncFunction [Exc , Any ]],
137+ do : Optional [AsyncFunction [Exc , object ]],
139138 stop : bool ,
140139 ) -> None :
141140 self .iterator = iterator
@@ -434,7 +433,7 @@ class PredicateSkipAsyncIterator(AsyncIterator[T]):
434433 __slots__ = ("iterator" , "until" , "_satisfied" )
435434
436435 def __init__ (
437- self , iterator : AsyncIterator [T ], until : AsyncFunction [T , Any ]
436+ self , iterator : AsyncIterator [T ], until : AsyncFunction [T , object ]
438437 ) -> None :
439438 self .iterator = iterator
440439 self .until = until
@@ -473,7 +472,7 @@ class PredicateTakeAsyncIterator(AsyncIterator[T]):
473472 __slots__ = ("iterator" , "until" , "_satisfied" )
474473
475474 def __init__ (
476- self , iterator : AsyncIterator [T ], until : AsyncFunction [T , Any ]
475+ self , iterator : AsyncIterator [T ], until : AsyncFunction [T , object ]
477476 ) -> None :
478477 self .iterator = iterator
479478 self .until = until
@@ -520,7 +519,7 @@ class FilterAsyncIterator(AsyncIterator[T]):
520519 def __init__ (
521520 self ,
522521 iterator : AsyncIterator [T ],
523- where : AsyncFunction [T , Any ],
522+ where : AsyncFunction [T , object ],
524523 ) -> None :
525524 self .iterator = iterator
526525 self .where = where
@@ -555,7 +554,7 @@ def __init__(
555554 self ,
556555 iterator : AsyncIterator [T ],
557556 subject : str ,
558- do : AsyncFunction [Observation , Any ],
557+ do : AsyncFunction [Observation , object ],
559558 ) -> None :
560559 self .iterator = iterator
561560 self .subject = subject
@@ -626,7 +625,7 @@ def __init__(
626625 self ,
627626 iterator : AsyncIterator [T ],
628627 subject : str ,
629- do : AsyncFunction [Observation , Any ],
628+ do : AsyncFunction [Observation , object ],
630629 base : int = 2 ,
631630 ) -> None :
632631 super ().__init__ (iterator , subject , do )
@@ -644,7 +643,7 @@ def __init__(
644643 iterator : AsyncIterator [T ],
645644 subject : str ,
646645 every : int ,
647- do : AsyncFunction [Observation , Any ],
646+ do : AsyncFunction [Observation , object ],
648647 ) -> None :
649648 super ().__init__ (iterator , subject , do )
650649 self .every = every
@@ -665,7 +664,7 @@ def __init__(
665664 iterator : AsyncIterator [T ],
666665 subject : str ,
667666 every : datetime .timedelta ,
668- do : AsyncFunction [Observation , Any ],
667+ do : AsyncFunction [Observation , object ],
669668 ) -> None :
670669 super ().__init__ (iterator , subject , do )
671670 self .every = every
0 commit comments