Skip to content

Commit 31a15d8

Browse files
authored
📝 Update console output with Click 8 messages (#789)
1 parent b8ba669 commit 31a15d8

11 files changed

Lines changed: 18 additions & 18 deletions

File tree

docs/tutorial/commands/callback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ $ python main.py create --verbose Camila
6767
Usage: main.py create [OPTIONS] USERNAME
6868
Try "main.py create --help" for help.
6969

70-
Error: no such option: --verbose
70+
Error: No such option: --verbose
7171
```
7272

7373
</div>

docs/tutorial/commands/options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ Creating user: Camila
6767
// Now test the command delete
6868
$ python main.py delete Camila
6969

70-
# Are you sure you want to delete the user? [y/N]: $ y
70+
# Are you sure you want to delete the user? [y/n]: $ y
7171

7272
Deleting user: Camila
7373

7474
$ python main.py delete Wade
7575

76-
# Are you sure you want to delete the user? [y/N]: $ n
76+
# Are you sure you want to delete the user? [y/n]: $ n
7777

7878
Operation cancelled
7979

@@ -82,13 +82,13 @@ Operation cancelled
8282

8383
$ python main.py delete-all
8484

85-
# Are you sure you want to delete ALL users? [y/N]: $ y
85+
# Are you sure you want to delete ALL users? [y/n]: $ y
8686

8787
Deleting all users
8888

8989
$ python main.py delete-all
9090

91-
# Are you sure you want to delete ALL users? [y/N]: $ n
91+
# Are you sure you want to delete ALL users? [y/n]: $ n
9292

9393
Operation cancelled
9494

docs/tutorial/multiple-values/arguments-with-multiple-values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Hello Ron
7272
// If you pass an invalid number of arguments you will get an error
7373
$ python main.py Draco Hagrid
7474

75-
Error: argument names takes 3 values
75+
Error: Argument 'names' takes 3 values
7676

7777
// And if you pass the exact number of values it will work correctly
7878
$ python main.py Draco Hagrid Dobby

docs/tutorial/multiple-values/options-with-multiple-values.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The username Morty has 3 coins
9595
// Try with invalid values (not enough)
9696
$ python main.py --user Camila 50
9797

98-
Error: --user option requires 3 arguments
98+
Error: Option '--user' requires 3 arguments
9999
```
100100

101101
</div>

docs/tutorial/options/prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ $ python main.py
108108
# Project name: $ Old Project
109109
# Repeat for confirmation: $ New Spice
110110

111-
Error: the two entered values do not match
111+
Error: The two entered values do not match
112112

113113
# Project name: $ Old Project
114114
# Repeat for confirmation: $ Old Project

docs/tutorial/parameter-types/bool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ python main.py --no-force
5454
Usage: main.py [OPTIONS]
5555
Try "main.py --help" for help.
5656

57-
Error: no such option: --no-force
57+
Error: No such option: --no-force
5858
```
5959

6060
</div>

docs/tutorial/parameter-types/datetime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $ python main.py july-19-1989
3838

3939
Usage: main.py [OPTIONS] [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d%H:%M:%S]
4040

41-
Error: Invalid value for '[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]': invalid datetime format: july-19-1989. (choose from %Y-%m-%d, %Y-%m-%dT%H:%M:%S, %Y-%m-%d %H:%M:%S)
41+
Error: Invalid value for 'BIRTH:[%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]': 'july-19-1989' does not match the formats '%Y-%m-%d', '%Y-%m-%dT%H:%M:%S', '%Y-%m-%d %H:%M:%S'.
4242
```
4343

4444
</div>

docs/tutorial/parameter-types/enum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ $ python main.py --network capsule
3434
Usage: main.py [OPTIONS]
3535
Try "main.py --help" for help.
3636

37-
Error: Invalid value for '--network': invalid choice: capsule. (choose from simple, conv, lstm)
37+
Error: Invalid value for '--network': 'capsule' is not one of 'simple', 'conv', 'lstm'.
3838

3939
// Note that enums are case sensitive by default
4040
$ python main.py --network CONV
4141

4242
Usage: main.py [OPTIONS]
4343
Try "main.py --help" for help.
4444

45-
Error: Invalid value for '--network': invalid choice: CONV. (choose from simple, conv, lstm)
45+
Error: Invalid value for '--network': 'CONV' is not one of 'simple', 'conv', 'lstm'.
4646
```
4747

4848
</div>

docs/tutorial/parameter-types/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $ python main.py Camila --age 15.3
5050
Usage: main.py [OPTIONS] NAME
5151
Try "main.py --help" for help.
5252

53-
Error: Invalid value for '--age': 15.3 is not a valid integer
53+
Error: Invalid value for '--age': '15.3' is not a valid integer
5454

5555
// Because 15.3 is not an INTEGER (it's a float)
5656
```

docs/tutorial/parameter-types/number.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@ $ python main.py 1002
5050
Usage: main.py [OPTIONS] ID
5151
Try "main.py --help" for help.
5252

53-
Error: Invalid value for 'ID': 1002 is not in the valid range of 0 to 1000.
53+
Error: Invalid value for 'ID': 1002 is not in the range 0<=x<=1000.
5454

5555
// Pass an invalid age
5656
$ python main.py 5 --age 15
5757

5858
Usage: main.py [OPTIONS] ID
5959
Try "main.py --help" for help.
6060

61-
Error: Invalid value for '--age': 15 is smaller than the minimum valid value 18.
61+
Error: Invalid value for '--age': 15 is not in the range x>=18.
6262

6363
// Pass an invalid score
6464
$ python main.py 5 --age 20 --score 100.5
6565

6666
Usage: main.py [OPTIONS] ID
6767
Try "main.py --help" for help.
6868

69-
Error: Invalid value for '--score': 100.5 is bigger than the maximum valid value 100.
69+
Error: Invalid value for '--score': 100.5 is not in the range x<=100.
7070

7171
// But as we didn't specify a minimum score, this is accepted
7272
$ python main.py 5 --age 20 --score -5
@@ -110,7 +110,7 @@ $ python main.py 1002
110110
Usage: main.py [OPTIONS] ID
111111
Try "main.py --help" for help.
112112

113-
Error: Invalid value for 'ID': 1002 is not in the valid range of 0 to 1000.
113+
Error: Invalid value for 'ID': 1002 is not in the range 0<=x<=1000.
114114

115115
// But --rank and --score use clamp
116116
$ python main.py 5 --rank 11 --score -5

0 commit comments

Comments
 (0)