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
OK, after some digging, I've figured out why this is happening. Due to how create_model is called in GenericModel.__class_getitem__, we have the following class relationships:
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:If I try to define an attribute on a generic model to be a generic abstract class, then the model will fail to validate. Here's a failing test case:
It appears to be failing because the
isinstance(value, cls)
check is failing for the generic type.The text was updated successfully, but these errors were encountered: