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
The problem is: if you have a pydantic dataclass or a pydantic model with a boolean field and you read a toml file with initialization values and initialize the dataclass/model with the resulting dict, then pydantic will report a validation error that states that the corresponding value in the dict is not a boolean.
The text was updated successfully, but these errors were encountered:
We store wrapped objects in the parsed result, don't feed it to pydantic validator directly, instead you should use .unwrap() to get the native python objects.
This is intentional to achieve rich style-preserving, closing it now.
Original problem reported with pydantic: pydantic/pydantic#10978
Minimal example that reproduces the problem: https://github.com/bschwedler/pydantic-tomlkit-bool
The problem is: if you have a pydantic dataclass or a pydantic model with a boolean field and you read a toml file with initialization values and initialize the dataclass/model with the resulting dict, then pydantic will report a validation error that states that the corresponding value in the dict is not a boolean.
The text was updated successfully, but these errors were encountered: