Coverage for docs_src/parameter_types/bool/tutorial004.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2025-12-19 20:29 +0000

1import typer 1abcdefghi

2 

3app = typer.Typer() 1abcdefghi

4 

5 

6@app.command() 1abcdefghi

7def main(in_prod: bool = typer.Option(True, " /--demo", " /-d")): 1abcdefghi

8 if in_prod: 1abcdefghi

9 print("Running in production") 1abcdefghi

10 else: 

11 print("Running demo") 1abcdefghi

12 

13 

14if __name__ == "__main__": 1abcdefghi

15 app() 1abcdefghi