Coverage for docs_src / parameter_types / bool / tutorial002_non_an.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-11-18 11:12 +0000
1import typer 1abcdefghij
3app = typer.Typer() 1abcdefghij
6@app.command() 1abcdefghij
7def main(accept: bool | None = typer.Option(None, "--accept/--reject")): 1abcdefghij
8 if accept is None: 1abcdefghij
9 print("I don't know what you want yet") 1abcdefghij
10 elif accept: 1abcdefghij
11 print("Accepting!") 1abcdefghij
12 else:
13 print("Rejecting!") 1abcdefghij
16if __name__ == "__main__": 1abcdefghij
17 app() 1abcdefghij