Coverage for tests/assets/corner_cases.py: 100%
5 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-04-14 00:18 +0000
1import typer 1iabcdefgh
3app = typer.Typer() 1iabcdefgh
6@app.command(context_settings={"auto_envvar_prefix": "TEST"}) 1iabcdefgh
7def main( 1abcdefgh
8 name: str = typer.Option("John", hidden=True),
9 lastname: str = typer.Option("Doe", "/lastname", show_default="Mr. Doe"),
10 age: int = typer.Option(lambda: 42, show_default=True),
11):
12 """
13 Say hello.
14 """
15 print(f"Hello {name} {lastname}, it seems you have {age}") 1iabcdefgh
18if __name__ == "__main__": 1iabcdefgh
19 app()