dacite
dacite copied to clipboard
Make from_dict accept data with Mapping type instead of Dict
Hello!
In my projects I often use dacite with objects that were returned from functions with Mapping[str, Any] in return annotation or MutableMapping[str, Any] which clashes with the from_dict signature that expects a Dict[str, Any] as a data type, and therefore forces to use typing.cast(dict, obj) every time.
Is it necessary to use a Dict as data type?
Thanks.
Hi @igorcoding - thank you for reporting this issue :)
OFC you have right and it makes sense, I'll change it.
Awesome! Thank you!