Coverage for tests / assets / hidden_option.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
1import typer 1abcdefghij
3app = typer.Typer() 1abcdefghij
6@app.command(context_settings={"auto_envvar_prefix": "TEST"}) 1abcdefghij
7def main( 1abcdefghij
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}") 1abcdefghij
18if __name__ == "__main__": 1abcdefghij
19 app()