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

5 statements  

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

1from typing import Annotated 1abcdefg

2 

3import typer 1abcdefg

4 

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

6 

7 

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

9def hello( 1abcdefg

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__": 1abcdefg

23 app()