- Switch to
to_info_dict()for parameter inspection, improving compatibility with variousclickversions.
Yanked: the changes in 2.0 related to defaults were found to be incorrect.
- Improve handling of default tuples for multi use options whose param type is a Choice
Yanked: the changes in 2.0 related to defaults were found to be incorrect.
- Fix a bug in which the types of defaults were not checked against already deduced types, resulting in incorrect union types being built for options with defaults.
Yanked: the changes in 2.0 related to defaults were found to be incorrect.
- Switch to
to_info_dict()for parameter inspection, improving compatibility with variousclickversions - When a parameter is given a
default,click_type_testwill now attempt to take the runtime type of that default into account
- Add support for
click>=8.3
click-type-testnow requiresclick<8.3, until support for version 8.3 can be added
- Support looser comparisons between Tuple and Union types.
tuple[...]andtyping.Tuple[...]should now compare equal, as should Unions in which the order of the union members varies.
- Add support for Python 3.13
- Add a parameter,
overrides, tocheck_param_annotationswhich can be used to skip type deduction and use a hard-coded value instead
- The type annotation used as the return type of a
callbackon a parameter will now be treated as an override which takes precedence over any deduction about the parameter type - The type annotation used as the return type of a custom type's
convertmethod will be checked and used as the annotated value for parameter types which do not implementAnnotatedParamType - The documentation is more explicit about type evaluation logic and order of overrides
- Fix handling for required options, non-required arguments,
nargs=-1, andnargs=NforN>1
- Enhance documentation and examples
- Add support for
click.Path(path_type=...)as a type or a callable with an annotated return type. Unsupportedpath_typevalues will raiseTypeError. - A new parameter is supported for
check_param_annotations,known_type_names, a mapping of type values to strings.check_param_annotationswill use this mapping in a best-effort fashion to display the names of types inBadAnnotationerrors.
- Remove
ExplicitlyAnnotatedOptionfrom the library due to issues with usability. It is now kept in theexamples/directory - Rename
AnnotatedOptiontoAnnotatedParameterto encompassArgumentsubclasses as well
- Fix release process to include build artifacts in github releases
- Initial release