Coverage for docs_src/arguments/help/tutorial007.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2025-04-14 00:18 +0000

1import typer 1iabcdefgh

2 

3 

4def main( 1abcdefgh

5 name: str = typer.Argument(..., help="Who to greet"), 

6 lastname: str = typer.Argument( 

7 "", help="The last name", rich_help_panel="Secondary Arguments" 

8 ), 

9 age: str = typer.Argument( 

10 "", help="The user's age", rich_help_panel="Secondary Arguments" 

11 ), 

12): 

13 """ 

14 Say hi to NAME very gently, like Dirk. 

15 """ 

16 print(f"Hello {name}") 1iabcdefgh

17 

18 

19if __name__ == "__main__": 1iabcdefgh

20 typer.run(main) 1iabcdefgh