Typed value variable in maybe_coroutine
This commit is contained in:
@@ -508,7 +508,7 @@ def _parse_ratelimit_header(request: Any, *, use_clock: bool = False) -> float:
|
|||||||
|
|
||||||
|
|
||||||
async def maybe_coroutine(f: Callable[..., Any], *args: Any, **kwargs: Any) -> Callable[..., Any]:
|
async def maybe_coroutine(f: Callable[..., Any], *args: Any, **kwargs: Any) -> Callable[..., Any]:
|
||||||
value = f(*args, **kwargs)
|
value: Any = f(*args, **kwargs)
|
||||||
if _isawaitable(value):
|
if _isawaitable(value):
|
||||||
return await value
|
return await value
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user