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