Skip to content

Commit 0d51a3c

Browse files
committed
Merge branch 'release/3.3.1'
2 parents 0448374 + 62631f1 commit 0d51a3c

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

pytest.ini

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ python_files =
66
addopts =
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

python_utils/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
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'

python_utils/generators.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import asyncio
12
import time
23

34
import 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

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
'pytest',
4343
'pytest-cov',
4444
'pytest-mypy',
45-
'pytest-flake8',
4645
'pytest-asyncio',
4746
'sphinx',
4847
'types-setuptools',

0 commit comments

Comments
 (0)