Releases: brentyi/tyro
Release v0.1.6
Niche improvements for nesting:
- Optionals:
- Optional types in containers (eg
List[Optional[T]]
). - Optional nested structures (eg
Optional[SomeDataclassType]
).
- Optional types in containers (eg
- Remove limit on # of nested unions/subparsers (previously: one union over child structures per parent class).
Enabling more useful "base configuration" design patterns via default_instance
:
- Introduce
dcargs.MISSING
for marking arguments as missing defaults. - Introduce
avoid_subparsers
argument fordcargs.cli()
.
Release v0.1.5
- Added support for general dictionary annotations, via
typing.Dict[K, V]
. - Refactored argument definition backend, which fixes some helptext corner cases for nested positional arguments.
Release v0.1.4
Improvements for non-dataclass nested structures:
- Helptext fix for standard classes.
- TypedDict support.
- NamedTuple support.
Release v0.1.3
Minor bug fixes:
- Underscores in positional arguments.
- Booleans with defaults in positional arguments.
- Docstring corner case for generics.
Release v0.1.2
Significantly more thorough checks for unsupported type annotations.
Release v0.1.1
Minor error handling improvements, better backward-compatibility.
Release v0.1.0
dcargs.parse()
has been renamed dcargs.cli()
.
Instead of just dataclasses, we now support general typed callables: functions, standard classes, attrs, etc.
Release v0.0.21
Docstring and helptext improvements:
- Suppress TypeError from docstring parser in Jupyter notebooks.
- Comment parsing is now more robust; it also now supports grouping,
where the same comment is associated with multiple fields. - Printed defaults, particularly for sequence types (lists, tuples,
sets), are now more consistently formatted.
Release v0.0.20
Improved readability of --help
. We now group arguments and generate comment/docstring-based helptext for nested dataclasses.
Release v0.0.19
Redesigned how annotations are parsed and used to instantiate fields; an iterative process is now recursive.
This is simpler, enables more informative error messages, and makes containers slightly more robust; supported annotations now include sequence types containing literals or enums (eg List[Literal[0, 1, 2, 3]]
or Tuple[SomeEnum, SomeEnum, SomeEnum]
).