Coverage for docs_src/parameter_types/number/tutorial001.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 id: int = typer.Argument(..., min=0, max=1000), 

6 age: int = typer.Option(20, min=18), 

7 score: float = typer.Option(0, max=100), 

8): 

9 print(f"ID is {id}") 1habcdefg

10 print(f"--age is {age}") 1habcdefg

11 print(f"--score is {score}") 1habcdefg

12 

13 

14if __name__ == "__main__": 1habcdefg

15 typer.run(main) 1habcdefg