Releases: brentyi/tyro
Releases · brentyi/tyro
Release v0.2.5
Fix spacing bug.
Release v0.2.4
Support general mappings, improve helptext.
Release v0.2.3
Type inference improvements:
- Support
typing.Any
in type narrowing logic. - Fix bug preventing contained types from being inferred when
dict
is used instead ofdict[KT, VT]
.
Release v0.2.2
Fixes for subparsers:
- Removed obsolete logic that equated optional types (with
Optional[T]
orUnion[T, None]
) as not required (when a default is provided). - Fix corner case for subparsers in nested classes.
Release v0.2.1
Minor Poetry fixes.
Release v0.2.0
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 likeshtab
,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
Re-add the py.typed
marker, which was inadvertently deleted.
Release v0.1.9
- Documentation refactor.
- Serialization utilities have been moved to
dcargs.extras.*
.
Release v0.1.8
- Supporting using built-ins directly:
dcargs.cli(int)
,dcargs.cli(List[str])
, etc.
Release v0.1.7
- 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 (egUnion[int, str]
,Union[Tuple[int, int], Tuple[str, str]]
, etc). - Support
total=False
forTypedDict
types. - Helptext generation improvements: conciseness, ignoring ANSI codes when wrapping.
- Add
prog=
argument todcargs.cli()
. - Various minor stability improvements.