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
# TODO: Revisit test_recursive_dict_model_with_none with new Python versions supporting PEP695 and
]
# TODO: Revisit test_recursive_dict_model_with_none with new Python versions supporting PEP695 and# pydantic v2deftest_recursive_generic_tuple_model_with_none() ->None:
classMyGenericScalarModel(Model[T], Generic[T]):
...
# if sys.version_info >= (3, 12):classMyGenericOnlyTuplesAndScalarsModel(
Model[tuple[TypeVarStore[T]
|ForwardRef('MyGenericOnlyTuplesAndScalarsAlias'), ...]],
Generic[T]):
...
# else:# # This for some reason cause a TypeError in Python 3.12. Probably related to PEP695,# # However new type syntax crashes pydantic.# class MyGenericOnlyTuplesAndScalarsModel(# Model[tuple[TypeVarStore[T]# | ForwardRef('MyGenericOnlyTuplesAndScalarsAlias[T]'),# ...]],# Generic[T]):# ...MyGenericOnlyTuplesAndScalarsAlias: TypeAlias= \
MyGenericScalarModel[T] |MyGenericOnlyTuplesAndScalarsModel[T]
The text was updated successfully, but these errors were encountered:
pydantic v2
However new type syntax crashes pydantic.
# This for some reason cause a TypeError in Python 3.12. Probably related to PEP695,
# However new type syntax crashes pydantic.
class MyGenericOnlyTuplesAndScalarsModel(
Model[tuple[TypeVarStore[T]
| ForwardRef('MyGenericOnlyTuplesAndScalarsAlias[T]'),
...]],
Generic[T]):
...
omnipy/tests/data/test_model.py
Line 1460 in 3ec7bd7
The text was updated successfully, but these errors were encountered: