Coverage for docs_src/parameter_types/file/tutorial005.py: 100%

6 statements  

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

1import typer 1abcdefghi

2 

3app = typer.Typer() 1abcdefghi

4 

5 

6@app.command() 1abcdefghi

7def main(config: typer.FileText = typer.Option(..., mode="a")): 1abcdefghi

8 config.write("This is a single line\n") 1abcdefghi

9 print("Config line written") 1abcdefghi

10 

11 

12if __name__ == "__main__": 1abcdefghi

13 app() 1abcdefghi