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
Hello, I found that the signature of inherited dataclass seems to have only its superclass fields. Is this expected behavior at pydantic v2? Due to this, FastAPI seems to ignore the subclass field value.
Example Code
frompydantic.dataclassesimportdataclass@dataclassclassA:
a: int@dataclassclassB(A):
b: int# In [4]: B.__signature__# Out[4]: <Signature (a: int) -> None> # "b: int" is missing
Thanks for reporting this. Looks like a bug with the pydantic dataclass signature generation. I've marked this with the good first issue tag, if anyone wants to help!
Initial Checks
Description
Hello, I found that the signature of inherited dataclass seems to have only its superclass fields. Is this expected behavior at pydantic v2? Due to this, FastAPI seems to ignore the subclass field value.
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: