Skip to content

Commit e45047b

Browse files
committed
and more docs fixes
1 parent 8c17905 commit e45047b

21 files changed

Lines changed: 57 additions & 51 deletions

docs/tutorial/commands/arguments.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ The same way as with a CLI application with a single command, subcommands (or ju
1010
// Check the help for create
1111
$ python main.py create --help
1212

13-
Usage: main.py create [OPTIONS] username
13+
Usage: main.py create [OPTIONS] {username}
14+
15+
Arguments:
16+
username [required]
1417

1518
Options:
1619
--help Show this message and exit.

docs/tutorial/commands/callback.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Just created a user
6767
// Notice that --verbose belongs to the callback, it has to go before create or delete ⛔️
6868
$ python main.py create --verbose Camila
6969

70-
Usage: main.py create [OPTIONS] username
70+
Usage: main.py create [OPTIONS] {username}
7171
Try "main.py create --help" for help.
7272

7373
Error: No such option: --verbose

docs/tutorial/commands/help.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Options:
2424
--help Show this message and exit.
2525

2626
Commands:
27-
create Create a new user with 'username'.
28-
delete Delete a user with 'username'.
27+
create Create a new user with username.
28+
delete Delete a user with username.
2929
delete-all Delete ALL users in the database.
3030
init Initialize the users database.
3131

@@ -36,7 +36,7 @@ $ python main.py create --help
3636

3737
Usage: main.py create [OPTIONS] {username}
3838

39-
Create a new user with 'username'.
39+
Create a new user with username.
4040

4141
Options:
4242
--help Show this message and exit.
@@ -46,7 +46,7 @@ $ python main.py delete --help
4646

4747
Usage: main.py delete [OPTIONS] {username}
4848

49-
Delete a user with 'username'.
49+
Delete a user with username.
5050

5151
If --force is not used, will ask for confirmation.
5252

@@ -112,10 +112,10 @@ Options:
112112
--help Show this message and exit.
113113

114114
Commands:
115-
create Create a new user with 'username'.
116-
delete Delete a user with 'username'.
115+
create Create a new user with username.
116+
delete Delete a user with username.
117117

118-
// It uses "Create a new user with 'username'." instead of "Some internal utility function to create."
118+
// It uses "Create a new user with username." instead of "Some internal utility function to create."
119119
```
120120

121121
</div>
@@ -257,7 +257,7 @@ $ python main.py delete --help
257257

258258
<b> </b><font color="#F4BF75"><b>Usage: </b></font><b>main.py delete [OPTIONS] {username} </b>
259259
<b> </b>
260-
<font color="#F92672"><b>Delete</b></font> a user with <i>'username'</i>.
260+
<font color="#F92672"><b>Delete</b></font> a user with <i>username</i>.
261261

262262
<font color="#A5A5A1">╭─ Arguments ───────────────────────────────────────────────────────╮</font>
263263
<font color="#A5A5A1">│ </font><font color="#F92672">*</font> username <font color="#F4BF75"><b>&lt;str&gt;</b></font> The username to be <font color="#F92672">deleted</font> │
@@ -319,7 +319,7 @@ $ python main.py delete --help
319319

320320
<b> </b><font color="#F4BF75"><b>Usage: </b></font><b>main.py delete [OPTIONS] {username} </b>
321321
<b> </b>
322-
<b>Delete</b> a user with <i>'username'</i>.
322+
<b>Delete</b> a user with <i>username</i>.
323323

324324
<font color="#A5A5A1">╭─ Arguments ───────────────────────────────────────────────────────╮</font>
325325
<font color="#A5A5A1">│ </font><font color="#F92672">*</font> username <font color="#F4BF75"><b>&lt;str&gt;</b></font> The username to be <b>deleted</b> │

docs/tutorial/options/callback-and-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ utils -- Extra utility commands for Typer apps.
6161
$ typer ./main.py run --help
6262

6363
// You get a help text with your CLI options as you normally would
64-
Usage: typer run [OPTIONS]
64+
Usage: typer [PATH_OR_MODULE] run [OPTIONS]
6565

6666
Run the provided Typer app.
6767

6868
Options:
69-
--name <str> [required]
69+
--name <str>
7070
--help Show this message and exit.
7171

7272
// Then try completion with your program

docs/tutorial/options/required.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Hello Camila Gutiérrez
5959
// And if you check the help
6060
$ python main.py --help
6161

62+
Arguments:
63+
name [required]
64+
6265
Usage: main.py [OPTIONS] {name}
6366

6467
Options:

docs/tutorial/options/version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Usage: main.py [OPTIONS]
3434

3535
Options:
3636
--version
37-
--name <str>
37+
--name <str> [default: World]
3838
--help Show this message and exit.
3939

4040

docs/tutorial/typer-command.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Then you can call it with:
169169

170170
```console
171171
$ typer main.py run --help
172-
Usage: typer run [OPTIONS]
172+
Usage: typer [PATH_OR_MODULE] run [OPTIONS]
173173

174174
Say hi to someone, by default to the World.
175175

@@ -196,7 +196,7 @@ For example:
196196

197197
```console
198198
$ typer my_package.main run --help
199-
Usage: typer run [OPTIONS]
199+
Usage: typer [PATH_OR_MODULE] run [OPTIONS]
200200

201201
Options:
202202
--name <str>
@@ -305,14 +305,14 @@ $ awesome-cli [OPTIONS] COMMAND [ARGS]...
305305

306306
**Commands**:
307307

308-
* `create`: Create a new user with 'username'.
309-
* `delete`: Delete a user with 'username'.
308+
* `create`: Create a new user with username.
309+
* `delete`: Delete a user with username.
310310
* `delete-all`: Delete ALL users in the database.
311311
* `init`: Initialize the users database.
312312

313313
## `awesome-cli create`
314314

315-
Create a new user with 'username'.
315+
Create a new user with username.
316316

317317
**Usage**:
318318

docs_src/commands/help/tutorial001_an_py310.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@app.command()
99
def create(username: str):
1010
"""
11-
Create a new user with USERNAME.
11+
Create a new user with username.
1212
"""
1313
print(f"Creating user: {username}")
1414

@@ -25,7 +25,7 @@ def delete(
2525
],
2626
):
2727
"""
28-
Delete a user with USERNAME.
28+
Delete a user with username.
2929
3030
If --force is not used, will ask for confirmation.
3131
"""

docs_src/commands/help/tutorial001_py310.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@app.command()
77
def create(username: str):
88
"""
9-
Create a new user with USERNAME.
9+
Create a new user with username.
1010
"""
1111
print(f"Creating user: {username}")
1212

@@ -21,7 +21,7 @@ def delete(
2121
),
2222
):
2323
"""
24-
Delete a user with USERNAME.
24+
Delete a user with username.
2525
2626
If --force is not used, will ask for confirmation.
2727
"""

docs_src/commands/help/tutorial002_py310.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
app = typer.Typer()
44

55

6-
@app.command(help="Create a new user with USERNAME.")
6+
@app.command(help="Create a new user with username.")
77
def create(username: str):
88
"""
99
Some internal utility function to create.
1010
"""
1111
print(f"Creating user: {username}")
1212

1313

14-
@app.command(help="Delete a user with USERNAME.")
14+
@app.command(help="Delete a user with username.")
1515
def delete(username: str):
1616
"""
1717
Some internal utility function to delete.

0 commit comments

Comments
 (0)