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