Coverage for docs_src/parameter_types/datetime/tutorial002.py: 100%
4 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1from datetime import datetime 1habcdefg
3import typer 1habcdefg
6def main( 1abcdefg
7 launch_date: datetime = typer.Argument(
8 ..., formats=["%Y-%m-%d", "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d %H:%M:%S", "%m/%d/%Y"]
9 ),
10):
11 print(f"Launch will be at: {launch_date}") 1habcdefg
14if __name__ == "__main__": 1habcdefg
15 typer.run(main) 1habcdefg