Skip to content

Commit

Permalink
📝 Fix typos in documentation (#761)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
  • Loading branch information
svlandeg and tiangolo authored Apr 7, 2024
1 parent cc9a407 commit b2834db
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/help-typer.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ As you have seen in the documentation, Typer is built on top of Click.

You can also sponsor:

* Pallets Project (Click maintainers)<a href="https://palletsprojects.com/donate" class="external-link" target="_blank">via the PSF</a> or <a href="https://tidelift.com/subscription/pkg/pypi-click" class="external-link" target="_blank">via Tidelift</a>
* Pallets Project (Click maintainers) <a href="https://palletsprojects.com/donate" class="external-link" target="_blank">via the PSF</a> or <a href="https://tidelift.com/subscription/pkg/pypi-click" class="external-link" target="_blank">via Tidelift</a>

---

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/arguments/optional.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Now let's see an alternative way to create the same *CLI argument*:

If you have an older version, you would get errors when trying to use `Annotated`.

Make sure you Upgrade the Typer version to at least 0.9.0 before using `Annotated`.
Make sure you upgrade the Typer version to at least 0.9.0 before using `Annotated`.

Before, you had this function parameter:

Expand Down
2 changes: 1 addition & 1 deletion docs_src/parameter_types/custom_types/tutorial001.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def parse_custom_class(value: str):

def main(
custom_arg: CustomClass = typer.Argument(parser=parse_custom_class),
custom_opt: CustomClass = typer.Option("Y", parser=parse_custom_class),
custom_opt: CustomClass = typer.Option("Foo", parser=parse_custom_class),
):
print(f"custom_arg is {custom_arg}")
print(f"--custom-opt is {custom_opt}")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_others.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_defaults_from_info():
assert value


def test_too_may_parsers():
def test_too_many_parsers():
def custom_parser(value: str) -> int:
return int(value) # pragma: no cover

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_parse_custom_type():
def test_parse_custom_type_with_default():
result = runner.invoke(app, ["0"])
assert "custom_arg is <CustomClass: value=00>" in result.output
assert "custom-opt is <CustomClass: value=YY>" in result.output
assert "custom-opt is <CustomClass: value=FooFoo>" in result.output


def test_script():
Expand Down

0 comments on commit b2834db

Please sign in to comment.