We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from typing import Generic, TypeVar from pydantic import Field, create_model from pydantic.generics import GenericModel T = TypeVar("T") class TestGenericModel(GenericModel): pass AAModel = create_model("AAModel", __base__=(TestGenericModel, Generic[T]), aa=(int, Field(0))) AAModel[int](aa=1)
output
Traceback (most recent call last): File "test.py", line 13, in <module> AAModel = create_model("AAModel", __base__=(TestGenericModel, Generic[T]), aa=(int, Field(0))) File "pydantic/main.py", line 972, in pydantic.main.create_model TypeError: type() doesn't support MRO entry resolution; use types.new_class()
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Checks
Bug
output
The text was updated successfully, but these errors were encountered: