File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,15 +6,10 @@ python_files =
66addopts =
77 --doctest-modules
88 --cov python_utils
9- --cov-report html
109 --cov-report term-missing
1110 --mypy
1211
13- flake8-ignore =
14- *.py W391
15- docs/*.py ALL
16-
17- doctest_optionflags =
12+ doctest_optionflags =
1813 ALLOW_UNICODE
1914 ALLOW_BYTES
2015
Original file line number Diff line number Diff line change 66 'with the standard Python install' )
77__url__ : str = 'https://github.com/WoLpH/python-utils'
88# Omit type info due to automatic versioning script
9- __version__ = '3.3.0 '
9+ __version__ = '3.3.1 '
Original file line number Diff line number Diff line change 1+ import asyncio
12import time
23
34import python_utils
@@ -26,8 +27,13 @@ async def abatcher(
2627
2728 while True :
2829 try :
29- item = await generator .__anext__ ()
30- except StopAsyncIteration :
30+ if interval_s :
31+ item = await asyncio .wait_for (
32+ generator .__anext__ (), interval_s
33+ )
34+ else :
35+ item = await generator .__anext__ ()
36+ except (StopAsyncIteration , asyncio .TimeoutError ):
3137 if batch :
3238 yield batch
3339 break
Original file line number Diff line number Diff line change 4242 'pytest' ,
4343 'pytest-cov' ,
4444 'pytest-mypy' ,
45- 'pytest-flake8' ,
4645 'pytest-asyncio' ,
4746 'sphinx' ,
4847 'types-setuptools' ,
You can’t perform that action at this time.
0 commit comments