From af67b42701c981b63fbbcf9d41fa09fa207f5683 Mon Sep 17 00:00:00 2001 From: Boris Smidt Date: Thu, 6 Jul 2023 15:00:12 +0200 Subject: [PATCH] #88: Fix the mypy linter --- typer/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typer/main.py b/typer/main.py index a685149e1f..9d9ef012e0 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: @@ -249,9 +249,9 @@ def run_wrapper(*args, **kwargs) -> Any: elif sys.version_info >= (3, 7): return asyncio.run(f(*args, **kwargs)) else: - asyncio.get_event_loop().run_until_complete(asyncio.wait(f(*args, **kwargs))) + asyncio.get_event_loop().run_until_complete(f(*args, **kwargs)) - return run_wrapper + return run_wrapper #type: ignore if inspect.iscoroutinefunction(f): callback = add_runner(f)