You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File ".../test.py", line 10, in <module>
new = c.structure(raw, MyType)
File ".../lib/python3.8/site-packages/cattr/converters.py", line 294, in structure
return self._structure_func.dispatch(cl)(obj, cl)
File ".../lib/python3.8/site-packages/cattr/converters.py", line 360, in _structure_error
raise StructureHandlerNotFoundError(msg, type_=cl)
cattr.errors.StructureHandlerNotFoundError: Unsupported type: <function NewType.<locals>.new_type at 0x7fb67c77a0d0>. Register a structure hook for it.
Of course, I can explicitly register structure hook for it, but it would be nice if it worked out of the box, if possible.
The text was updated successfully, but these errors were encountered:
Description
I want to use
typing.NewType
in my code, but structuring these variables throws an exception.What I Did
Of course, I can explicitly register structure hook for it, but it would be nice if it worked out of the box, if possible.
The text was updated successfully, but these errors were encountered: