📝 Update console output with Click 8 messages (#789)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sofie Van Landeghem · committed by GitHub · parent b8ba669 · Browse files · 11 files·+18 added−18 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
11 files+18 added−18 removed
- other:+18 added−18 removed
Provenance
- Commit
31a15d8- Tree
7956bae- Author
Sofie Van Landeghem <svlandeg@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
b8ba669
11 files changed+18 added−18 removed
modified:docs/tutorial/commands/callback.md+1 added-1 removed
65 unmodified lines66676869707071727374111 unmodified linesExpand all65 unmodified lines
Usage: main.py create [OPTIONS] USERNAMETry "main.py create --help" for help.
Error: no such option: --verboseError: No such option: --verbose```
</div>
111 unmodified linesExpand allmodified:docs/tutorial/commands/options.md+4 added-4 removed
65 unmodified lines66 67 // Now test the command delete68 $ python main.py delete Camila69 70-# Are you sure you want to delete the user? [y/N]: $ y70+# Are you sure you want to delete the user? [y/n]: $ y71 72 Deleting user: Camila73 74 $ python main.py delete Wade75 76-# Are you sure you want to delete the user? [y/N]: $ n76+# Are you sure you want to delete the user? [y/n]: $ n77 78 Operation cancelled79 80 // And finally, the command delete-all81 // Notice it doesn't have CLI arguments, only a CLI option82 83 $ python main.py delete-all84 85-# Are you sure you want to delete ALL users? [y/N]: $ y85+# Are you sure you want to delete ALL users? [y/n]: $ y86 87 Deleting all users88 89 $ python main.py delete-all90 91-# Are you sure you want to delete ALL users? [y/N]: $ n91+# Are you sure you want to delete ALL users? [y/n]: $ n92 93 Operation cancelled94 95 // And if you pass the --force CLI option, it doesn't need to confirm12 unmodified linesmodified:docs/tutorial/multiple-values/arguments-with-multiple-values.md+1 added-1 removed
70 unmodified lines71 72 // If you pass an invalid number of arguments you will get an error73 $ python main.py Draco Hagrid74 75-Error: argument names takes 3 values75+Error: Argument 'names' takes 3 values76 77 // And if you pass the exact number of values it will work correctly78 $ python main.py Draco Hagrid Dobby79 6 unmodified linesmodified:docs/tutorial/multiple-values/options-with-multiple-values.md+1 added-1 removed
93 unmodified lines94 95 // Try with invalid values (not enough)96 $ python main.py --user Camila 5097 98-Error: --user option requires 3 arguments98+Error: Option '--user' requires 3 arguments99 ```100 101 </div>modified:docs/tutorial/options/prompt.md+1 added-1 removed
106 unmodified lines107 108 # Project name: $ Old Project109 # Repeat for confirmation: $ New Spice110 111-Error: the two entered values do not match111+Error: The two entered values do not match112 113 # Project name: $ Old Project114 # Repeat for confirmation: $ Old Project115 6 unmodified linesmodified:docs/tutorial/parameter-types/bool.md+1 added-1 removed
52 unmodified lines53 54 Usage: main.py [OPTIONS]55 Try "main.py --help" for help.56 57-Error: no such option: --no-force57+Error: No such option: --no-force58 ```59 60 </div>61 165 unmodified linesmodified:docs/tutorial/parameter-types/datetime.md+1 added-1 removed
36 unmodified lines37 $ python main.py july-19-198938 39 Usage: main.py [OPTIONS] [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d%H:%M:%S]40 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'.42 ```43 44 </div>45 50 unmodified linesmodified:docs/tutorial/parameter-types/enum.md+2 added-2 removed
32 unmodified lines33 34 Usage: main.py [OPTIONS]35 Try "main.py --help" for help.36 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'.38 39 // Note that enums are case sensitive by default40 $ python main.py --network CONV41 42 Usage: main.py [OPTIONS]43 Try "main.py --help" for help.44 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'.46 ```47 48 </div>49 87 unmodified linesmodified:docs/tutorial/parameter-types/index.md+1 added-1 removed
48 unmodified lines49 50 Usage: main.py [OPTIONS] NAME51 Try "main.py --help" for help.52 53-Error: Invalid value for '--age': 15.3 is not a valid integer53+Error: Invalid value for '--age': '15.3' is not a valid integer54 55 // Because 15.3 is not an INTEGER (it's a float)56 ```57 9 unmodified linesmodified:docs/tutorial/parameter-types/number.md+4 added-4 removed
48 unmodified lines49 50 Usage: main.py [OPTIONS] ID51 Try "main.py --help" for help.52 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.54 55 // Pass an invalid age56 $ python main.py 5 --age 1557 58 Usage: main.py [OPTIONS] ID59 Try "main.py --help" for help.60 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.62 63 // Pass an invalid score64 $ python main.py 5 --age 20 --score 100.565 66 Usage: main.py [OPTIONS] ID67 Try "main.py --help" for help.68 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.70 71 // But as we didn't specify a minimum score, this is accepted72 $ python main.py 5 --age 20 --score -573 35 unmodified lines109 110 Usage: main.py [OPTIONS] ID111 Try "main.py --help" for help.112 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.114 115 // But --rank and --score use clamp116 $ python main.py 5 --rank 11 --score -5117 65 unmodified linesmodified:docs/tutorial/parameter-types/uuid.md+1 added-1 removed
40 unmodified lines41 42 Usage: main.py [OPTIONS] USER_ID43 Try "main.py --help" for help.44 45-Error: Invalid value for 'USER_ID': 7479706572-72756c6573 is not a valid UUID value45+Error: Invalid value for 'USER_ID': 7479706572-72756c6573 is not a valid UUID.46 ```47 48 </div>