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

10 statements  

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

1from enum import Enum 1abcdefghi

2 

3import typer 1abcdefghi

4 

5 

6class NeuralNetwork(str, Enum): 1abcdefghi

7 simple = "simple" 1abcdefghi

8 conv = "conv" 1abcdefghi

9 lstm = "lstm" 1abcdefghi

10 

11 

12app = typer.Typer() 1abcdefghi

13 

14 

15@app.command() 1abcdefghi

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

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

18 

19 

20if __name__ == "__main__": 1abcdefghi

21 app() 1abcdefghi