We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
thanks for this amazing library!
Describe the bug It is not possible it seems to have the dataclass argument of the from_dict method to accept a union of class
To Reproduce
@DataClass class A: x: str
@DataClass class B: y: int
data = { 'y': 1 }
result = from_dict(data_class=A|B, data=data)
Expected behavior result woud be B(y=1)
Environment
dacite
The text was updated successfully, but these errors were encountered:
No branches or pull requests
thanks for this amazing library!
Describe the bug
It is not possible it seems to have the dataclass argument of the from_dict method to accept a union of class
To Reproduce
@DataClass
class A:
x: str
@DataClass
class B:
y: int
data = { 'y': 1 }
result = from_dict(data_class=A|B, data=data)
Expected behavior
result woud be B(y=1)
Environment
dacite
version: 1.8.1The text was updated successfully, but these errors were encountered: