diff --git a/typer/main.py b/typer/main.py index a685149e1f..9e4f4ebfe5 100644 --- a/typer/main.py +++ b/typer/main.py @@ -240,7 +240,7 @@ def command( cls = TyperCommand def decorator(f: CommandFunctionType) -> CommandFunctionType: - def add_runner(f: CommandFunctionType) -> CommandFunctionType: + def add_runner(f: CommandFunctionType) -> CommandFunctionType: #type: ignore @wraps(f) def run_wrapper(*args, **kwargs) -> Any: if sys.version_info >= (3, 11) and self.loop_factory: @@ -251,7 +251,7 @@ def run_wrapper(*args, **kwargs) -> Any: else: asyncio.get_event_loop().run_until_complete(asyncio.wait(f(*args, **kwargs))) - return run_wrapper + return run_wrapper #type: ignore if inspect.iscoroutinefunction(f): callback = add_runner(f)