Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit b8cd08a

Browse files
committed
Use Pyrogram's List when consuming generators
This will pretty print them when using non-async methods
1 parent 54ad043 commit b8cd08a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyrogram/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def async_to_sync(obj, name):
3131
main_loop = asyncio.get_event_loop()
3232

3333
async def consume_generator(coroutine):
34-
return [i async for i in coroutine]
34+
return types.List([i async for i in coroutine])
3535

3636
@functools.wraps(function)
3737
def async_to_sync_wrap(*args, **kwargs):

0 commit comments

Comments
 (0)