Skip to content
Myr

:bug: Fix docs format with hl_lines (#65)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent 67ecde5 · Browse files · 3 files+12 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+12 added−12 removed

  • other:+12 added−12 removed

3 files+12 added−12 removed

modified:docs/tutorial/subcommands/add-typer.md+2 added-2 removed
modified:docs/tutorial/subcommands/nested-subcommands.md+9 added-9 removed
8 unmodified lines
9## A CLI app for reigns1011Let's start with a file `reigns.py`:1213```Python hl_lines=""13```Python14{!./src/subcommands/tutorial003/reigns.py!}15```1617This is already a simple *CLI program* to manage reigns:
30 unmodified lines
48## A CLI app for towns4950And now the equivalent for managing towns in `towns.py`:5152```Python hl_lines=""52```Python53{!./src/subcommands/tutorial003/towns.py!}54```5556With it, you can manage towns:
30 unmodified lines
87## Manage the land in a CLI app8889Now let's put the `reigns` and `towns` together in the same *CLI program* in `lands.py`:9091```Python hl_lines=""91```Python92{!./src/subcommands/tutorial003/lands.py!}93```9495And now we have a single *CLI program* with a command (or command group) `reigns` that has its own commands. And another command `towns` with its own subcommands.
147 unmodified lines
243Here are all the files if you want to review/copy them:244245`reigns.py`:246247```Python hl_lines=""247```Python248{!./src/subcommands/tutorial003/reigns.py!}249```250251`towns.py`:252253```Python hl_lines=""253```Python254{!./src/subcommands/tutorial003/towns.py!}255```256257`lands.py`:258259```Python hl_lines=""259```Python260{!./src/subcommands/tutorial003/lands.py!}261```262263`users.py`:264265```Python hl_lines=""265```Python266{!./src/subcommands/tutorial003/users.py!}267```268269`items.py`:270271```Python hl_lines=""271```Python272{!./src/subcommands/tutorial003/items.py!}273```274275`main.py`:276277```Python hl_lines=""277```Python278{!./src/subcommands/tutorial003/main.py!}279```280281!!! tip
14 unmodified lines
modified:docs/tutorial/subcommands/single-file.md+1 added-1 removed
1In some cases, it's possible that your application code needs to live on a single file.23You can still use the same ideas:45```Python hl_lines=""5```Python6{!./src/subcommands/tutorial002/main.py!}7```89There are several things to notice here...
139 unmodified lines