Coverage for docs_src/commands/help/tutorial003.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1import typer 1abcdefgh
3app = typer.Typer() 1abcdefgh
6@app.command() 1abcdefgh
7def create(username: str): 1abcdefgh
8 """
9 Create a user.
10 """
11 print(f"Creating user: {username}") 1abcdefgh
14@app.command(deprecated=True) 1abcdefgh
15def delete(username: str): 1abcdefgh
16 """
17 Delete a user.
19 This is deprecated and will stop being supported soon.
20 """
21 print(f"Deleting user: {username}") 1abcdefgh
24if __name__ == "__main__": 1abcdefgh
25 app() 1abcdefgh