You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
218 B
Python
13 lines
218 B
Python
2 years ago
|
import inspect
|
||
|
|
||
|
|
||
|
def is_async_mode():
|
||
|
async def f():
|
||
|
"""Unasync transforms async functions in sync functions"""
|
||
|
return None
|
||
|
|
||
|
return inspect.iscoroutinefunction(f)
|
||
|
|
||
|
|
||
|
ASYNC_MODE = is_async_mode()
|