Coverage for docs_src/options/name/tutorial005.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 18:26 +0000

1import typer 1habcdefg

2 

3 

4def main( 1abcdefg

5 name: str = typer.Option(..., "--name", "-n"), 

6 formal: bool = typer.Option(False, "--formal", "-f"), 

7): 

8 if formal: 1habcdefg

9 print(f"Good day Ms. {name}.") 1habcdefg

10 else: 

11 print(f"Hello {name}") 1habcdefg

12 

13 

14if __name__ == "__main__": 1habcdefg

15 typer.run(main) 1habcdefg