0.8.0
For custom converters, we can now choose if they should be mandatory or optional.
Up to now, they were only optional.
This is an API-breaking change. So if you'd like to update old (<0.8.0
) code, you need to change this:
@type_checked_constructor(converters={'foo': conv_foo})
@dataclass
class Foo:
foo: ...
to that:
@type_checked_constructor(converters={'foo': optional_converter(conv_foo)})
@dataclass
class Foo:
foo: ...
because the default (and only) behavior of converters was to be optional.
Now, there is a new option to use optional_converter
instead.