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
Perhaps I am abusing conversions for something that they are not intended to handle, but I encountered a behavior that I found suprising and which feels like a bug.
I was trying to support deserializing floats from both floats and strings. I registered a converter like this:
The result was, ValidationError: [{'loc': ['a'], 'err': 'expected type string, found number'}], which is a little suprising, because it seems that adding a converter from string to float has made deserializing a float to itself invalid.
PS: I also tried adding a converter from float to float. That caused RecursionError: maximum recursion depth exceeded.
The text was updated successfully, but these errors were encountered:
Perhaps I am abusing conversions for something that they are not intended to handle, but I encountered a behavior that I found suprising and which feels like a bug.
I was trying to support deserializing floats from both floats and strings. I registered a converter like this:
And then tried this:
The result was,
ValidationError: [{'loc': ['a'], 'err': 'expected type string, found number'}]
, which is a little suprising, because it seems that adding a converter from string to float has made deserializing a float to itself invalid.PS: I also tried adding a converter from float to float. That caused
RecursionError: maximum recursion depth exceeded
.The text was updated successfully, but these errors were encountered: