Coverage for tests / assets / completion_no_types.py: 100%
10 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
1import typer 1abcdefghij
3app = typer.Typer() 1abcdefghij
6def complete(ctx, args, incomplete): 1abcdefghij
7 typer.echo(f"info name is: {ctx.info_name}", err=True) 1abcdefghij
8 typer.echo(f"args is: {args}", err=True) 1abcdefghij
9 typer.echo(f"incomplete is: {incomplete}", err=True) 1abcdefghij
10 return [ 1abcdefghij
11 ("Camila", "The reader of books."),
12 ("Carlos", "The writer of scripts."),
13 ("Sebastian", "The type hints guy."),
14 ]
17@app.command() 1abcdefghij
18def main(name: str = typer.Option("World", autocompletion=complete)): 1abcdefghij
19 print(f"Hello {name}") 1abcdefghij
22if __name__ == "__main__": 1abcdefghij
23 app() 1abcdefghij