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

13 statements  

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

1import typer 1abcdefghij

2 

3sub_app = typer.Typer() 1abcdefghij

4 

5variable = "Some text" 1abcdefghij

6 

7 

8@sub_app.command() 1abcdefghij

9def hello(name: str = "World", age: int = typer.Option(0, help="The age of the user")): 1abcdefghij

10 """ 

11 Say Hello 

12 """ 

13 

14 

15@sub_app.command() 1abcdefghij

16def hi(user: str = typer.Argument("World", help="The name of the user to greet")): 1abcdefghij

17 """ 

18 Say Hi 

19 """ 

20 

21 

22@sub_app.command() 1abcdefghij

23def bye(): 1abcdefghij

24 """ 

25 Say bye 

26 """ 

27 

28 

29app = typer.Typer(help="Demo App", epilog="The end", rich_markup_mode=None) 1abcdefghij

30app.add_typer(sub_app, name="sub") 1abcdefghij

31 

32 

33@app.command() 1abcdefghij

34def top(): 1abcdefghij

35 """ 

36 Top command 

37 """