Coverage for tests / assets / cli / sample.py: 100%

12 statements  

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

1import typer 1abcdefghij

2 

3app = typer.Typer() 1abcdefghij

4 

5 

6@app.command() 1abcdefghij

7def hello(name: str = "World", formal: bool = False): 1abcdefghij

8 """ 

9 Say hi 

10 """ 

11 if formal: 1abcdefghij

12 typer.echo(f"Good morning Ms. {name}") 1abcdefghij

13 else: 

14 typer.echo(f"Hello {name}!") 1abcdefghij

15 

16 

17@app.command() 1abcdefghij

18def bye(friend: bool = False): 1abcdefghij

19 """ 

20 Say bye 

21 """ 

22 if friend: 1abcdefghij

23 typer.echo("Goodbye my friend") 1abcdefghij

24 else: 

25 typer.echo("Goodbye") 1abcdefghij