v4.16.0
Features
- Return-value objects can now declare their own exit code by defining a
__cyclopts_returncode__method, which is honored by all built-inresult_actionhandlers. Customresult_actioncallables can opt in via the newcyclopts.resolve_returncodehelper. By @BrianPugh in #818 - PEP 692 support: when
**kwargsis annotated asUnpack[SomeTypedDict], the TypedDict's fields are promoted to top-level CLI options instead of the generic--[KEYWORD]catch-all. Per-fieldRequired/NotRequiredmarkers are respected independently of the parent kwargs argument. By @BrianPugh in #819 CycloptsError.msgnow accepts arich.Textinstance. Cyclopts' error-message style palette is exposed ascyclopts.exceptions.STYLE_OFFENDING_VALUE,STYLE_NAME,STYLE_VALID_CHOICE,STYLE_SUGGESTION, andSTYLE_SOURCE. By @BrianPugh in #814
Full Changelog: v4.15.0...v4.16.0