@@ -32,7 +32,7 @@ async def test_aio_timeout_generator(
3232 maximum_interval : float ,
3333 iterable : types .AsyncIterable [types .Any ],
3434 result : int ,
35- ):
35+ ) -> None :
3636 i = None
3737 async for i in python_utils .aio_timeout_generator (
3838 timeout , interval , iterable , maximum_interval = maximum_interval
@@ -46,15 +46,15 @@ async def test_aio_timeout_generator(
4646 'timeout,interval,interval_multiplier,maximum_interval,iterable,result' ,
4747 [
4848 (0.01 , 0.006 , 0.5 , 0.01 , 'abc' , 'c' ),
49- (0.01 , 0.006 , 0.5 , 0.01 , itertools .count , 2 ), # type: ignore
49+ (0.01 , 0.006 , 0.5 , 0.01 , itertools .count , 2 ),
5050 (0.01 , 0.006 , 0.5 , 0.01 , itertools .count (), 2 ),
5151 (0.01 , 0.006 , 1.0 , None , 'abc' , 'c' ),
5252 (
5353 timedelta (seconds = 0.01 ),
5454 timedelta (seconds = 0.006 ),
5555 2.0 ,
5656 timedelta (seconds = 0.01 ),
57- itertools .count , # type: ignore
57+ itertools .count ,
5858 2 ,
5959 ),
6060 ],
@@ -70,7 +70,7 @@ def test_timeout_generator(
7070 types .Callable [..., types .Iterable [types .Any ]],
7171 ],
7272 result : int ,
73- ):
73+ ) -> None :
7474 i = None
7575 for i in python_utils .timeout_generator (
7676 timeout = timeout ,
@@ -85,11 +85,11 @@ def test_timeout_generator(
8585
8686
8787@pytest .mark .asyncio
88- async def test_aio_generator_timeout_detector ():
88+ async def test_aio_generator_timeout_detector () -> None :
8989 # Make pyright happy
9090 i = None
9191
92- async def generator ():
92+ async def generator () -> types . AsyncGenerator [ int , None ] :
9393 for i in range (10 ):
9494 await asyncio .sleep (i / 100.0 )
9595 yield i
@@ -123,10 +123,10 @@ async def generator():
123123
124124
125125@pytest .mark .asyncio
126- async def test_aio_generator_timeout_detector_decorator_reraise ():
126+ async def test_aio_generator_timeout_detector_decorator_reraise () -> None :
127127 # Test regular timeout with reraise
128128 @python_utils .aio_generator_timeout_detector_decorator (timeout = 0.05 )
129- async def generator_timeout ():
129+ async def generator_timeout () -> types . AsyncGenerator [ int , None ] :
130130 for i in range (10 ):
131131 await asyncio .sleep (i / 100.0 )
132132 yield i
@@ -137,15 +137,15 @@ async def generator_timeout():
137137
138138
139139@pytest .mark .asyncio
140- async def test_aio_generator_timeout_detector_decorator_clean_exit ():
140+ async def test_aio_generator_timeout_detector_decorator_clean_exit () -> None :
141141 # Make pyright happy
142142 i = None
143143
144144 # Test regular timeout with clean exit
145145 @python_utils .aio_generator_timeout_detector_decorator (
146146 timeout = 0.05 , on_timeout = None
147147 )
148- async def generator_clean ():
148+ async def generator_clean () -> types . AsyncGenerator [ int , None ] :
149149 for i in range (10 ):
150150 await asyncio .sleep (i / 100.0 )
151151 yield i
@@ -157,10 +157,10 @@ async def generator_clean():
157157
158158
159159@pytest .mark .asyncio
160- async def test_aio_generator_timeout_detector_decorator_reraise_total ():
160+ async def test_aio_generator_timeout_detector_decorator_reraise_total () -> None :
161161 # Test total timeout with reraise
162162 @python_utils .aio_generator_timeout_detector_decorator (total_timeout = 0.1 )
163- async def generator_reraise ():
163+ async def generator_reraise () -> types . AsyncGenerator [ int , None ] :
164164 for i in range (10 ):
165165 await asyncio .sleep (i / 100.0 )
166166 yield i
@@ -171,15 +171,15 @@ async def generator_reraise():
171171
172172
173173@pytest .mark .asyncio
174- async def test_aio_generator_timeout_detector_decorator_clean_total ():
174+ async def test_aio_generator_timeout_detector_decorator_clean_total () -> None :
175175 # Make pyright happy
176176 i = None
177177
178178 # Test total timeout with clean exit
179179 @python_utils .aio_generator_timeout_detector_decorator (
180180 total_timeout = 0.1 , on_timeout = None
181181 )
182- async def generator_clean_total ():
182+ async def generator_clean_total () -> types . AsyncGenerator [ int , None ] :
183183 for i in range (10 ):
184184 await asyncio .sleep (i / 100.0 )
185185 yield i
0 commit comments