Skip to content

Commit

Permalink
#88: Fix the mypy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
borissmidt committed Jul 6, 2023
1 parent 85159fb commit 05539d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit 05539d7

Please sign in to comment.