Skip to content
Myr

📝 Fix minor inconsistencies and typos in tutorial (#1067)

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

authored by Thibaut Voirand · committed by GitHub · parent b88c327 · Browse files · 5 files+5 added−5 removed
This commit

State

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

Diff stats

5 files+5 added−5 removed

  • tests:+1 added−1 removed
  • other:+4 added−4 removed

5 files+5 added−5 removed

modified:docs/tutorial/commands/one-or-multiple.md+1 added-1 removed
modified:docs/tutorial/commands/options.md+1 added-1 removed
33 unmodified lines
34Commands:35 create36 delete37 delete-all38 info38 init39```4041</div>42
57 unmodified lines
modified:docs/tutorial/first-steps.md+1 added-1 removed
456 unmodified lines
457In reality, the parameters that require an order can be made *optional* too. And the ones that come with a flag (like `--lastname`) can be *required* too.458459### In **Typer**460461To try and make it a bit easier, we'll normally use the words "parameter" or "argument" to refer to Python functions.461To try and make it a bit easier, we'll normally use the words "parameter" or "argument" to refer to "Python functions parameters" or "Python functions arguments".462463We'll use ***CLI argument*** to refer to those *CLI parameters* that depend on the specific order. That are **required** by default.464465And we'll use ***CLI option*** to refer to those *CLI parameters* that depend on a name that starts with `--` (like `--lastname`). That are **optional** by default.
44 unmodified lines
modified:docs_src/commands/one_or_multiple/tutorial002.py+1 added-1 removed
11 unmodified lines
12def callback():13 """14 Creates a single user Hiro Hamada.1516 In the next version it will create 5 users more.16 In the next version it will create 5 more users.17 """181920if __name__ == "__main__":
1 unmodified line
modified:tests/test_tutorial/test_commands/test_one_or_multiple/test_tutorial002.py+1 added-1 removed
12 unmodified lines
13def test_help():14 result = runner.invoke(app, ["--help"])15 assert result.exit_code == 016 assert "Creates a single user Hiro Hamada." in result.output17 assert "In the next version it will create 5 users more." in result.output17 assert "In the next version it will create 5 more users." in result.output18 assert "Commands" in result.output19 assert "create" in result.output2021
13 unmodified lines