Coverage for tests / assets / corner_cases.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-02-09 12:36 +0000

1import typer 1abcdefgh

2 

3app = typer.Typer() 1abcdefgh

4 

5 

6@app.command(context_settings={"auto_envvar_prefix": "TEST"}) 1abcdefgh

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}") 1abcdefgh

16 

17 

18if __name__ == "__main__": 1abcdefgh

19 app()