Coverage for docs_src/testing/app01/main.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
1from typing import Optional 1abcdefgh
3import typer 1abcdefgh
5app = typer.Typer() 1abcdefgh
8@app.command() 1abcdefgh
9def main(name: str, city: Optional[str] = None): 1abcdefgh
10 print(f"Hello {name}") 1abcdefgh
11 if city: 1abcdefgh
12 print(f"Let's have a coffee in {city}") 1abcdefgh
15if __name__ == "__main__": 1abcdefgh
16 app() 1abcdefgh