Releases: BrianPugh/cyclopts
Releases · BrianPugh/cyclopts
v1.2.0
Features
App
now takes an optional parameterdefault_parameter: Parameter
that allows the configuration of what values a defaultParameter
uses. Parameters now have a resolution order for determining configuration values. Basically it goes (highest-to-lowest priority)annotated parameter
->parenting app default
->parenting-parenting app default
->...
. by @BrianPugh in #33- New classmethod
Parameter.combine
which can construct a new, single, Parameter from multiple Parameters. - New classmethod
Parameter.default
which is similar toParameter()
, but it will override all parenting Parameters. App
andParameter
's repr strings have been greatly simplified to only include non-default supplied parameters.
Bug Fixes
- conditionally import
typing_extensions
by @BrianPugh in #34 - use
importlib.metadata
to check distribution version. by @BrianPugh in #36 - Handle mutable signature parameter defaults. by @BrianPugh in #37
Breaking Changes
This release technically contains some breaking changes, but realistically no-one should be impacts.
- Removed
MultipleParameterAnnotationError
; we now handle multiple Parameter resolution. Specifically, for mutlipleParameter
in anAnnotated
, they are evaluated left->right (right-most has highest precedence/priority). - All of
Parameter
's defaults are nowNone
. No change in default functionality.
Full Changelog: v1.1.1...v1.2.0
v1.1.1
Bug Fixes
- Fix error-handling of POSITIONAL_ONLY, VAR_KEYWORD, and VAR_POSITIONAL arguments. by @BrianPugh in #27
Full Changelog: v1.1.0...v1.1.1
v1.1.0
Features
- Add environment variable parsing via
Parameter.env_var
. by @BrianPugh in #20 - Allow multiple names for a command. by @BrianPugh in #22
Full Changelog: v1.0.2...v1.1.0
v1.0.2
Bugfix
- attempt to import
readline
so that arrows work ininteractive_shell
.
Full Changelog: v1.0.1...v1.0.2
v1.0.1
What's Changed
- Add unsupported
Tuple[type_, ...]
check. by @BrianPugh in #15
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Major release; I'm happy with the API and overall performance.
What's Changed
- Make show_choices be optional to not close any doors for future comptability. by @BrianPugh in #12
- Make converter be Optional to not close any doors for future compatility by @BrianPugh in #13
New Contributors
- @dependabot made their first contribution in #11
Full Changelog: v0.2.0...v1.0.0
v0.2.0
What's Changed
- add dispatcher argument to interactive_shell by @BrianPugh in #8
- Fix Optional[Annotated[...]] resolution. by @BrianPugh in #9
- Don't display defaults if the default value is None. by @BrianPugh in #10
Full Changelog: v0.1.2...v0.2.0
v0.1.2
What's Changed
- Don't consider
show=False
orparse=False
parameters when determining column layout in help text by @BrianPugh in #5 - Simplify name when autoderived from
sys.argv[0]
by @BrianPugh in #6 - Fix fallback meta default help by @BrianPugh in #7
- If an
App
doesn't have explicithelp
text, it should fallback toapp.default_command.__doc__
, thenapp.meta.default_command
,app.meta.meta.default_command
, and so on.
- If an
- Fixes displaying meta commands in help screen.
- Added pages for "--help" and "--version" to the docs.
Full Changelog: v0.1.1...v0.1.2
v0.1.1
What's Changed
- Removed
app.__len__
, causes more confusion than convenience it provided. - fix annotations not properly resolving in python3.8 by @BrianPugh in #3
- Fix help parameters special columns by @BrianPugh in #4
Full Changelog: v0.1.0...v0.1.1