Coverage for docs_src / printing / tutorial003_py39.py: 100%

11 statements  

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

1import typer 1abcdefgh

2from rich.console import Console 1abcdefgh

3from rich.table import Table 1abcdefgh

4 

5console = Console() 1abcdefgh

6 

7app = typer.Typer() 1abcdefgh

8 

9 

10@app.command() 1abcdefgh

11def main(): 1abcdefgh

12 table = Table("Name", "Item") 1abcdefgh

13 table.add_row("Rick", "Portal Gun") 1abcdefgh

14 table.add_row("Morty", "Plumbus") 1abcdefgh

15 console.print(table) 1abcdefgh

16 

17 

18if __name__ == "__main__": 1abcdefgh

19 app() 1abcdefgh