Skip to content

Commit

Permalink
docs: simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
neithere committed Dec 30, 2023
1 parent bd6f68e commit 9c35a72
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions docs/source/the_story.rst
Expand Up @@ -101,14 +101,10 @@ A more complete example::
from argh import Help


FORMAT_CHOICES = "json", "yaml"
DEFAULT_FORMAT = FORMAT_CHOICES[0]


def load(
path: Annotated[str, Help("path to the file to load")],
*,
file_format: Annotated[str, Literal[FORMAT_CHOICES])] = DEFAULT_FORMAT,
file_format: Literal["json", "yaml"] = "json",
dry_run: bool = False
) -> str:
return do_something(path, file_format, dry_run)
Expand Down

0 comments on commit 9c35a72

Please sign in to comment.