Coverage for docs_src/multiple_values/arguments_with_multiple_values/tutorial001.py: 100%

10 statements  

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

1from pathlib import Path 1abcdefghi

2from typing import List 1abcdefghi

3 

4import typer 1abcdefghi

5 

6app = typer.Typer() 1abcdefghi

7 

8 

9@app.command() 1abcdefghi

10def main(files: List[Path], celebration: str): 1abcdefghi

11 for path in files: 1abcdefghi

12 if path.is_file(): 1abcdefghi

13 print(f"This file exists: {path.name}") 1abcdefghi

14 print(celebration) 1abcdefghi

15 

16 

17if __name__ == "__main__": 1abcdefghi

18 app() 1abcdefghi