Skip to content
Myr

📝 Fix typos in documentation (#761)

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 cc9a407 · 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.

Trailers

  • Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>

Diff stats

5 files+5 added−5 removed

  • tests:+2 added−2 removed
  • other:+3 added−3 removed

5 files+5 added−5 removed

modified:docs/tutorial/arguments/optional.md+1 added-1 removed
47 unmodified lines
48 Typer added support for `Annotated` (and started recommending it) in version 0.9.0.4950 If you have an older version, you would get errors when trying to use `Annotated`.5152 Make sure you Upgrade the Typer version to at least 0.9.0 before using `Annotated`.52 Make sure you upgrade the Typer version to at least 0.9.0 before using `Annotated`.5354Before, you had this function parameter:5556```Python
177 unmodified lines
modified:docs/help-typer.md+1 added-1 removed
232 unmodified lines
233As you have seen in the documentation, Typer is built on top of Click.234235You can also sponsor:236237* 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>237* 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>238239---240241Thanks! 🚀
modified:docs_src/parameter_types/custom_types/tutorial001.py+1 added-1 removed
13 unmodified lines
141516def main(17 custom_arg: CustomClass = typer.Argument(parser=parse_custom_class),18 custom_opt: CustomClass = typer.Option("Y", parser=parse_custom_class),18 custom_opt: CustomClass = typer.Option("Foo", parser=parse_custom_class),19):20 print(f"custom_arg is {custom_arg}")21 print(f"--custom-opt is {custom_opt}")22
3 unmodified lines
modified:tests/test_tutorial/test_parameter_types/test_custom_types/test_tutorial001.py+1 added-1 removed
24 unmodified lines
2526def test_parse_custom_type_with_default():27 result = runner.invoke(app, ["0"])28 assert "custom_arg is <CustomClass: value=00>" in result.output29 assert "custom-opt is <CustomClass: value=YY>" in result.output29 assert "custom-opt is <CustomClass: value=FooFoo>" in result.output303132def test_script():33 result = subprocess.run(
5 unmodified lines
modified:tests/test_others.py+1 added-1 removed
28 unmodified lines
29 value = solve_typer_info_defaults(TyperInfo())30 assert value313233def test_too_may_parsers():33def test_too_many_parsers():34 def custom_parser(value: str) -> int:35 return int(value) # pragma: no cover3637 class CustomClickParser(click.ParamType):
221 unmodified lines