-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register multiple hooks for a class #541
Comments
Hello! Can you create your converter with |
I think so! |
Alright, closing this to keep the issue list more manageable ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: