Coverage for docs_src/parameter_types/number/tutorial001.py: 100%

5 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 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}") 1iabcdefgh

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

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

12 

13 

14if __name__ == "__main__": 1iabcdefgh

15 typer.run(main) 1iabcdefgh