typer icon indicating copy to clipboard operation
typer copied to clipboard

Fix type annotation of typer.run

Open yassu opened this issue 3 years ago • 1 comments

Problem: type annotation of typer.run is

def run(function: Callable[..., Any]) -> Any

However, this function returns None.

Solution: type annotation of typer.run changes to

def run(function: Callable[..., Any]) -> None

yassu avatar May 23 '21 03:05 yassu

Alternatively, the last line of the function could be return app() instead of app(), but this probably isn't necessary.

alexreg avatar May 10 '22 01:05 alexreg

📝 Docs preview for commit 097a89f468859d306a7e82686cec609b5b371aa6 at: https://6366755339a2407903ea73ce--typertiangolo.netlify.app

github-actions[bot] avatar Nov 05 '22 14:11 github-actions[bot]

Good catch, thanks @yassu! :rocket:

tiangolo avatar Nov 05 '22 14:11 tiangolo