Skip to content

Commit

Permalink
asyncio.gather API consistency with stdlib
Browse files Browse the repository at this point in the history
- closes tqdm#1212
  • Loading branch information
MapleCCC authored Jul 30, 2021
1 parent d0483be commit 223561a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/py37_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def double(i):
@mark.asyncio
async def test_gather(capsys):
"""Test asyncio gather"""
res = await gather(list(map(double, range(30))))
res = await gather(*map(double, range(30)))
_, err = capsys.readouterr()
assert '30/30' in err
assert res == list(range(0, 30 * 2, 2))
2 changes: 1 addition & 1 deletion tqdm/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def as_completed(cls, fs, *, loop=None, timeout=None, total=None, **tqdm_kwargs)
total=total, **tqdm_kwargs)

@classmethod
async def gather(cls, fs, *, loop=None, timeout=None, total=None, **tqdm_kwargs):
async def gather(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs):
"""
Wrapper for `asyncio.gather`.
"""
Expand Down

0 comments on commit 223561a

Please sign in to comment.