Dacite will put an int
into an Optional[float]
field but not a float | None
field.
#245
Labels
bug
Something isn't working
Summary
Apologies if this is logged somewhere else. Dacite will put an
int
into anOptional[float]
field but not afloat | None
field....
To Reproduce
Where the error from the second print statement is
This seems to be because of dacite's implementation of
is_instance
not being consistent withisinstance
...
Expected behavior
Probably both should fail. But at least they should be consistent.
...
Environment
dacite
version: 1.8.1The text was updated successfully, but these errors were encountered: