Add type hints
This commit is contained in:
parent
4c651198f3
commit
6c76610cdb
|
@ -97,8 +97,8 @@ def find_events_during_stay(
|
||||||
async def time_function(
|
async def time_function(
|
||||||
name: str,
|
name: str,
|
||||||
func: typing.Callable[..., typing.Coroutine[typing.Any, typing.Any, typing.Any]],
|
func: typing.Callable[..., typing.Coroutine[typing.Any, typing.Any, typing.Any]],
|
||||||
*args,
|
*args: typing.Any,
|
||||||
**kwargs,
|
**kwargs: typing.Any,
|
||||||
) -> tuple[str, typing.Any, float, Exception | None]:
|
) -> tuple[str, typing.Any, float, Exception | None]:
|
||||||
"""Time the execution of an asynchronous function."""
|
"""Time the execution of an asynchronous function."""
|
||||||
start_time, result, exception = time(), None, None
|
start_time, result, exception = time(), None, None
|
||||||
|
|
Loading…
Reference in a new issue