Skip to content

Commit 6a4aef8

Browse files
committed
fix enum display
1 parent 80f5461 commit 6a4aef8

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/tutorial/parameter-types/enum.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Check it:
1919
```console
2020
$ python main.py --help
2121

22-
// Notice the predefined values [simple|conv|lstm]
22+
// Notice the predefined values <simple|conv|lstm>
2323
Usage: main.py [OPTIONS]
2424

2525
Options:
26-
--network [simple|conv|lstm] [default: simple]
26+
--network <simple|conv|lstm> [default: simple]
2727
--help Show this message and exit.
2828

2929
// Try it
@@ -91,8 +91,8 @@ $ python main.py --help
9191
Usage: main.py [OPTIONS]
9292

9393
Options:
94-
--groceries [Eggs|Bacon|Cheese] [default: Eggs, Cheese]
95-
--help Show this message and exit.
94+
--groceries <Eggs|Bacon|Cheese> [default: Eggs, Cheese]
95+
--help Show this message and exit.
9696

9797
// Try it with the default values
9898
$ python main.py
@@ -123,11 +123,11 @@ You can also use `Literal` to represent a set of possible predefined choices, wi
123123
```console
124124
$ python main.py --help
125125

126-
// Notice the predefined values [simple|conv|lstm]
126+
// Notice the predefined values <simple|conv|lstm>
127127
Usage: main.py [OPTIONS]
128128

129129
Options:
130-
--network [simple|conv|lstm] [default: simple]
130+
--network <simple|conv|lstm> [default: simple]
131131
--help Show this message and exit.
132132

133133
// Try it

tests/test_tutorial/test_parameter_types/test_enum/test_tutorial003.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_help(mod: ModuleType):
2626
result = runner.invoke(mod.app, ["--help"])
2727
assert result.exit_code == 0
2828
assert "--groceries" in result.output
29-
assert "<list[Eggs|Bacon|Cheese]>" in result.output
29+
assert "<Eggs|Bacon|Cheese>" in result.output
3030
assert "default: Eggs, Cheese" in result.output
3131

3232

tests/test_tutorial/test_parameter_types/test_index/test_tutorial001.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_invalid():
4444
result = runner.invoke(app, ["Camila", "--age", "15.3"])
4545
assert result.exit_code != 0
4646
assert "Invalid value for '--age'" in result.output
47-
assert "'15.3' is not a valid integer" in result.output
47+
assert "'15.3' is not a valid int." in result.output
4848

4949

5050
def test_script():

0 commit comments

Comments
 (0)