Skip to content

Commit

Permalink
Fix documentation for argument groups.
Browse files Browse the repository at this point in the history
The arguments needed a type hint.
  • Loading branch information
pedro-avalos committed Aug 4, 2023
1 parent 70e9cdd commit 7af642c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ Creating argument groups by group title:
>>> from argparse_dataclass import ArgumentParser
>>> @dataclass
... class Options:
... foo = field(metadata=dict(group="string group"))
... bar = field(metadata=dict(group=dict(title="dict group", description="using a dict")))
... baz = field(metadata=dict(group=("sequence group", "using a sequence")))
... foo: str = field(metadata=dict(group="string group"))
... bar: str = field(metadata=dict(group=dict(title="dict group", description="using a dict")))
... baz: str = field(metadata=dict(group=("sequence group", "using a sequence")))
...
>>> parser = ArgumentParser(Options)
>>> parser.print_help()
Expand Down

0 comments on commit 7af642c

Please sign in to comment.