bugfix
This commit is contained in:
parent
99310f4b3b
commit
b97c946891
@ -2,6 +2,14 @@ import random
|
|||||||
import asyncio
|
import asyncio
|
||||||
import inspect
|
import inspect
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
|
def awaitify(sync_func):
|
||||||
|
"""Wrap a synchronous callable to allow ``await``'ing it"""
|
||||||
|
@wraps(sync_func)
|
||||||
|
async def async_func(*args, **kwargs):
|
||||||
|
return sync_func(*args, **kwargs)
|
||||||
|
return async_func
|
||||||
|
|
||||||
def to_func(func):
|
def to_func(func):
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
|
Loading…
Reference in New Issue
Block a user