mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Use Pyrogram's List when consuming generators
This will pretty print them when using non-async methods
This commit is contained in:
parent
54ad043a70
commit
b8cd08adb0
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ def async_to_sync(obj, name):
|
|||
main_loop = asyncio.get_event_loop()
|
||||
|
||||
async def consume_generator(coroutine):
|
||||
return [i async for i in coroutine]
|
||||
return types.List([i async for i in coroutine])
|
||||
|
||||
@functools.wraps(function)
|
||||
def async_to_sync_wrap(*args, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue