Skip to content

Releases: brentyi/tyro

Release v0.2.5

26 Aug 03:32
Compare
Choose a tag to compare

Fix spacing bug.

Release v0.2.4

26 Aug 03:21
Compare
Choose a tag to compare

Support general mappings, improve helptext.

Release v0.2.3

25 Aug 02:42
Compare
Choose a tag to compare

Type inference improvements:

  • Support typing.Any in type narrowing logic.
  • Fix bug preventing contained types from being inferred when dict is used instead of dict[KT, VT].

Release v0.2.2

24 Aug 20:03
Compare
Choose a tag to compare

Fixes for subparsers:

  • Removed obsolete logic that equated optional types (with Optional[T] or Union[T, None]) as not required (when a default is provided).
  • Fix corner case for subparsers in nested classes.

Release v0.2.1

23 Aug 23:35
Compare
Choose a tag to compare

Minor Poetry fixes.

Release v0.2.0

23 Aug 23:12
93f5baa
Compare
Choose a tag to compare

New features:

  • Support for mixed-type literals.
  • Support nesting structures in standard Python containers: List[Struct], Set[Struct], Tuple[Struct, Struct], Dict[str, Struct], etc.
  • Add dcargs.generate_parser() for integration with tools like shtab, argcomplete, pyzshcomplete, etc.
  • Support defaults with narrower types than annotations.
  • Support for including multiple optional subparsers, more clear/verbose subcommand names.
  • Support inheritance from generic types.
  • Generalized support for directly passing in types, eg dcargs.cli(Union[SubcommandA, SubcommandB]).

Maintenance:

  • Helptext formatting improvements: consistency for subcommands, Windows support, edge case fixes.
  • Reduce redundant logic.

Release v0.1.10

21 Jul 22:15
Compare
Choose a tag to compare

Re-add the py.typed marker, which was inadvertently deleted.

Release v0.1.9

19 Jul 13:21
Compare
Choose a tag to compare
  • Documentation refactor.
  • Serialization utilities have been moved to dcargs.extras.*.

Release v0.1.8

18 Jul 22:26
Compare
Choose a tag to compare
  • Supporting using built-ins directly: dcargs.cli(int), dcargs.cli(List[str]), etc.

Release v0.1.7

18 Jul 09:23
Compare
Choose a tag to compare
  • Support for nesting collections. (tuples inside tuples inside dictionaries, etc)
  • Overhaul mechanisms for handling Union types, which are now supported recursively and much more generally (eg Union[int, str], Union[Tuple[int, int], Tuple[str, str]], etc).
  • Support total=False for TypedDict types.
  • Helptext generation improvements: conciseness, ignoring ANSI codes when wrapping.
  • Add prog= argument to dcargs.cli().
  • Various minor stability improvements.