Coverage for docs_src/parameter_types/enum/tutorial002.py: 100%
8 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 18:26 +0000
1from enum import Enum 1habcdefg
3import typer 1habcdefg
6class NeuralNetwork(str, Enum): 1habcdefg
7 simple = "simple" 1habcdefg
8 conv = "conv" 1habcdefg
9 lstm = "lstm" 1habcdefg
12def main( 1abcdefg
13 network: NeuralNetwork = typer.Option(NeuralNetwork.simple, case_sensitive=False),
14):
15 print(f"Training neural network of type: {network.value}") 1habcdefg
18if __name__ == "__main__": 1habcdefg
19 typer.run(main) 1habcdefg