Coverage for docs_src/parameter_types/enum/tutorial002_an.py: 100%
9 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
4from typing_extensions import Annotated 1habcdefg
7class NeuralNetwork(str, Enum): 1habcdefg
8 simple = "simple" 1habcdefg
9 conv = "conv" 1habcdefg
10 lstm = "lstm" 1habcdefg
13def main( 1abcdefg
14 network: Annotated[
15 NeuralNetwork, typer.Option(case_sensitive=False)
16 ] = NeuralNetwork.simple,
17):
18 print(f"Training neural network of type: {network.value}") 1habcdefg
21if __name__ == "__main__": 1habcdefg
22 typer.run(main) 1habcdefg