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

8 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 18:26 +0000

1from enum import Enum 1abcdefgh

2 

3import typer 1abcdefgh

4 

5 

6class NeuralNetwork(str, Enum): 1abcdefgh

7 simple = "simple" 1abcdefgh

8 conv = "conv" 1abcdefgh

9 lstm = "lstm" 1abcdefgh

10 

11 

12def main(network: NeuralNetwork = NeuralNetwork.simple): 1abcdefgh

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

14 

15 

16if __name__ == "__main__": 1abcdefgh

17 typer.run(main) 1abcdefgh