Coverage for docs_src/parameter_types/datetime/tutorial001.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2025-12-19 20:29 +0000

1from datetime import datetime 1abcdefghi

2 

3import typer 1abcdefghi

4 

5app = typer.Typer() 1abcdefghi

6 

7 

8@app.command() 1abcdefghi

9def main(birth: datetime): 1abcdefghi

10 print(f"Interesting day to be born: {birth}") 1abcdefghi

11 print(f"Birth hour: {birth.hour}") 1abcdefghi

12 

13 

14if __name__ == "__main__": 1abcdefghi

15 app() 1abcdefghi