core[patch]: exclude special pydantic init params (#25084)

This commit is contained in:
Bagatur
2024-08-05 16:32:51 -07:00
committed by GitHub
parent 63ddf0afb4
commit e572521f2a
3 changed files with 8 additions and 7 deletions

View File

@@ -1751,11 +1751,11 @@ def test__get_all_basemodel_annotations_v2(use_v1_namespace: bool) -> None:
if use_v1_namespace:
class ModelA(BaseModel, Generic[A]):
class ModelA(BaseModel, Generic[A], extra="allow"):
a: A
else:
class ModelA(BaseModelProper, Generic[A]): # type: ignore[no-redef]
class ModelA(BaseModelProper, Generic[A], extra="allow"): # type: ignore[no-redef]
a: A
class ModelB(ModelA[str]):
@@ -1812,7 +1812,7 @@ def test__get_all_basemodel_annotations_v2(use_v1_namespace: bool) -> None:
def test__get_all_basemodel_annotations_v1() -> None:
A = TypeVar("A")
class ModelA(BaseModel, Generic[A]):
class ModelA(BaseModel, Generic[A], extra="allow"):
a: A
class ModelB(ModelA[str]):