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
{{ message }}
This repository was archived by the owner on Dec 26, 2024. It is now read-only.
I have some pydantic models that define custom __init__() with a call to super(). When migrating to DualBaseModel as my base model, defining such models started to raise TypeError. Here's the minimal example that reproduces the issue:
from pydantic_duality import DualBaseModel
class MyModel(DualBaseModel):
one: str
two: str
def __init__(self, **kwargs):
super().__init__(**kwargs)
And the traceback:
Traceback (most recent call last):
File "pyduality.py", line 4, in <module>
class MyModel(DualBaseModel):
TypeError: __class__ set to <class '__main__.MyModelRequest'> defining 'MyModel' as <class '__main__.MyModel'>
The problem only occurs when having super() inside __init__(). Tested with Python 3.11.2
I have some pydantic models that define custom
__init__()with a call tosuper(). When migrating to DualBaseModel as my base model, defining such models started to raiseTypeError. Here's the minimal example that reproduces the issue:And the traceback:
The problem only occurs when having
super()inside__init__(). Tested with Python 3.11.2