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

5 statements  

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

1from typing import Annotated 1abcdefgh

2 

3import typer 1abcdefgh

4 

5app = typer.Typer(rich_markup_mode="rich") 1abcdefgh

6 

7 

8@app.command(help="Say [bold red]hello[/bold red] to the user.") 1abcdefgh

9def hello( 1abcdefgh

10 user_1: Annotated[ 

11 str, 

12 typer.Argument(help="The [bold]cool[/bold] name of the [green]user[/green]"), 

13 ], 

14 user_2: Annotated[str, typer.Argument(help="The world")] = "The World", 

15 force: Annotated[ 

16 bool, typer.Option(help="Force the welcome [red]message[/red]") 

17 ] = False, 

18): 

19 print(f"Hello {user_1} and {user_2}") # pragma: no cover 

20 

21 

22if __name__ == "__main__": 1abcdefgh

23 app()