pydantic has lots of support for coercing types, however pydantic-pycharm-plugin current gives a message saying simply Expected type "x", got "y" instead
:
Is there any possibility to change the error message to something like Field is of type "x", "y" may not be parsable to "x"
? (or something cleaner, can't think right now)
Perhaps it might even be possible to not show a warning in some obvious cases eg, int
or str
when the field is of type datetime
? If that's not possible, just making the message more friendly/correct might be simplest.
I can imagine that actually trying to parse the value and see if it'll work (eg. '1'
will work for int
but 'x'
would not) would involve duplicating the whole of pydantic's logic in kotlin which is completely impossible. So I'm definitely not asking for that!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too