Coverage for docs_src / parameter_types / enum / tutorial001_py310.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-03-26 21:46 +0000

1from enum import Enum 1abcdefg

2 

3import typer 1abcdefg

4 

5 

6class NeuralNetwork(str, Enum): 1abcdefg

7 simple = "simple" 1abcdefg

8 conv = "conv" 1abcdefg

9 lstm = "lstm" 1abcdefg

10 

11 

12app = typer.Typer() 1abcdefg

13 

14 

15@app.command() 1abcdefg

16def main(network: NeuralNetwork = NeuralNetwork.simple): 1abcdefg

17 print(f"Training neural network of type: {network.value}") 1abcdefg

18 

19 

20if __name__ == "__main__": 1abcdefg

21 app() 1abcdefg