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
One potential solution:
Make a best effort check for generic types by checking if the obtained value is an instance of the origin class of the generic type. Specifically, add
FYI, I forked dacite and made some changes to make generics work. I use it in a personal project where I have more unit tests written around it. Did not find issues until now (python 3.9).
FYI, I forked dacite and made some changes to make generics work. I use it in a personal project where I have more unit tests written around it. Did not find issues until now (python 3.9).
Hi, asking here as well: would you be interested in making a PR back to this repo? Thanks! :)
Currently, is_instance fails for any generic type
Eg:
This impacts cases when custom generics are a part of dataclass instances, requiring disabling type_checking for creation of all attributes.
Eg:
One potential solution:
Make a best effort check for generic types by checking if the obtained value is an instance of the origin class of the generic type. Specifically, add
After this line.
Related: #131, #157
The text was updated successfully, but these errors were encountered: