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

12 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-03-26 21:46 +0000

1import typer 1abcdefg

2 

3app = typer.Typer() 1abcdefg

4 

5 

6@app.command() 1abcdefg

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

8 """ 

9 Say hi 

10 """ 

11 if formal: 1abcdefg

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

13 else: 

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

15 

16 

17@app.command() 1abcdefg

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

19 """ 

20 Say bye 

21 """ 

22 if friend: 1abcdefg

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

24 else: 

25 typer.echo("Goodbye") 1abcdefg