Skip to content

Commit 729182b

Browse files
authored
Fix outdated optional *CLI argument* section in tutorial
To match the example, description is updated
1 parent 1823714 commit 729182b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/tutorial/arguments/optional.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ name: str
113113

114114
Now, finally what we came for, an optional *CLI argument*.
115115

116-
To make a *CLI argument* optional, use `typer.Argument()` and pass a different "default" as the first parameter to `typer.Argument()`, for example `None`:
116+
To make a *CLI argument* optional, use `Optional[X]` type for `Annotated` and provide a "default" value for function parameter, for example `None`:
117117

118118
```Python hl_lines="7"
119119
{!../docs_src/arguments/optional/tutorial002_an.py!}

0 commit comments

Comments
 (0)