ValidataclassMixin.to_dict: Optionally filter None values #39
Labels
breaking changes
This issue will cause a breaking change (or deprecation warning).
enhancement
Improvements to existing features or smaller new features
question
Further information is requested
Milestone
Currently the
to_dict()
method of theValidataclassMixin
has no option to automatically filterNone
values, only for filteringUnsetValue
(which it does by default but can be disabled by settingkeep_unset_values=True
).There should be an option to filter
None
values (default: don't filter). The parameter could be calledfilter_none
.For consistency, the
keep_unset_values
parameter MAYBE should be renamed tofilter_unset_value
(default: True) as well, but this would be a breaking change in the API, so the existing parameter should be kept as an alias (with a deprecation warning) and later removed in the 1.0.0 release.(This will potentially be included in #62.)
The text was updated successfully, but these errors were encountered: