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
Seems like TypeAliasType would be a more friendly solution to solve this pattern. A quick tests shows that the only thing that is lost (which is not even being used at the moment) is the title of the root model on model construction.
Additionally, the TypeAliasType class does not seem to be importable from the typing module in 3.11 despite what is written in the OP, instead it must be imported from typing_extensions as of 3.11.
The text was updated successfully, but these errors were encountered:
Following pydantic/pydantic#10635 (comment)
Seems like
TypeAliasType
would be a more friendly solution to solve this pattern. A quick tests shows that the only thing that is lost (which is not even being used at the moment) is the title of the root model on model construction.Additionally, the
TypeAliasType
class does not seem to be importable from thetyping
module in 3.11 despite what is written in the OP, instead it must be imported fromtyping_extensions
as of 3.11.The text was updated successfully, but these errors were encountered: