Coverage for docs_src/subcommands/tutorial003/items.py: 100%

11 statements  

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

1import typer 1abcdefghi

2 

3app = typer.Typer() 1abcdefghi

4 

5 

6@app.command() 1abcdefghi

7def create(item: str): 1abcdefghi

8 print(f"Creating item: {item}") 1abcdefghi

9 

10 

11@app.command() 1abcdefghi

12def delete(item: str): 1abcdefghi

13 print(f"Deleting item: {item}") 1abcdefghi

14 

15 

16@app.command() 1abcdefghi

17def sell(item: str): 1abcdefghi

18 print(f"Selling item: {item}") 1abcdefghi

19 

20 

21if __name__ == "__main__": 1abcdefghi

22 app() 1abcdefghi