Coverage for docs_src / parameter_types / file / tutorial003_non_an.py: 100%
8 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(file: typer.FileBinaryRead = typer.Option(...)): 1abcdefghij
8 processed_total = 0 1abcdefghij
9 for bytes_chunk in file: 1abcdefghij
10 # Process the bytes in bytes_chunk
11 processed_total += len(bytes_chunk) 1abcdefghij
12 print(f"Processed bytes total: {processed_total}") 1abcdefghij
15if __name__ == "__main__": 1abcdefghij
16 app() 1abcdefghij