Coverage for docs_src/multiple_values/multiple_options/tutorial001_an.py: 100%
9 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 typing import List, Optional 1abcdefgh
3import typer 1abcdefgh
4from typing_extensions import Annotated 1abcdefgh
7def main(user: Annotated[Optional[List[str]], typer.Option()] = None): 1abcdefgh
8 if not user: 1abcdefgh
9 print(f"No provided users (raw input = {user})") 1abcdefgh
10 raise typer.Abort() 1abcdefgh
11 for u in user: 1abcdefgh
12 print(f"Processing user: {u}") 1abcdefgh
15if __name__ == "__main__": 1abcdefgh
16 typer.run(main) 1abcdefgh