diff --git a/autogpts/autogpt/autogpt/core/runner/client_lib/utils.py b/autogpts/autogpt/autogpt/core/runner/client_lib/utils.py index 39b5135f..ebb03edb 100644 --- a/autogpts/autogpt/autogpt/core/runner/client_lib/utils.py +++ b/autogpts/autogpt/autogpt/core/runner/client_lib/utils.py @@ -1,7 +1,7 @@ import asyncio import functools from bdb import BdbQuit -from typing import Callable, ParamSpec, TypeVar +from typing import Any, Callable, Coroutine, ParamSpec, TypeVar import click @@ -53,9 +53,9 @@ def handle_exceptions( return wrapped -def coroutine(f): +def coroutine(f: Callable[P, Coroutine[Any, Any, T]]) -> Callable[P, T]: @functools.wraps(f) - def wrapper(*args, **kwargs): + def wrapper(*args: P.args, **kwargs: P.kwargs): return asyncio.run(f(*args, **kwargs)) return wrapper