konradhalas / dacite

Simple creation of data classes from dictionaries.
MIT License
1.72k stars 106 forks source link

Improving type casting from list of values to mixed tuples #228

Open plonerma opened 1 year ago

plonerma commented 1 year ago

When using mixed tuples, values are (currently) only cast if the data contains a tuple as well. If the data contains a list, this leads to unexpected behavior (see #227).

This PR fixes this behavior to broaden the usage of the tuple-build_value rule to data types (as long as the expected type is a tuple).