Coverage for tests / assets / cli / multi_app.py: 100%
16 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
3sub_app = typer.Typer() 1abcdefghij
5variable = "Some text" 1abcdefghij
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 typer.echo(f"Hello {name}") 1abcdefghij
16@sub_app.command() 1abcdefghij
17def hi(user: str = typer.Argument("World", help="The name of the user to greet")): 1abcdefghij
18 """
19 Say Hi
20 """
23@sub_app.command() 1abcdefghij
24def bye(): 1abcdefghij
25 """
26 Say bye
27 """
28 typer.echo("sub bye") 1abcdefghij
31app = typer.Typer(help="Demo App", epilog="The end") 1abcdefghij
32app.add_typer(sub_app, name="sub") 1abcdefghij
35@app.command() 1abcdefghij
36def top(): 1abcdefghij
37 """
38 Top command
39 """
40 typer.echo("top") 1abcdefghij