Closed isohedronpipeline closed 4 months ago
Hello!
Can you create your converter with Converter(omit_if_default=True)
? That's the easiest way. If not we can brainstorm further.
I think so! Thanks Tin :-)
Alright, closing this to keep the issue list more manageable ;)
I mentioned this at the end of another ticket, but I thought it deserved its own issue.
I'd like to register multiple unstructure hooks to a class. Specifically, I want to register subclasses and also omit defaults.
How can I combine this:
include_subclasses(Toy, c, union_strategy=configure_tagged_union)
with this:hook = make_dict_unstructure_fn(Toy, c, _cattrs_omit_if_default=True)
Thanks :-)
Ben