Skip to content

Commit e143932

Browse files
committed
Add params to signature, not model itself
1 parent acb522f commit e143932

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

tests/test_loaders_dumpers/models/books_normalized_pydantic.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ class WeakRefShimBaseModel(BaseModel):
1313
__slots__ = '__weakref__'
1414

1515
class ConfiguredBaseModel(WeakRefShimBaseModel):
16-
validate_assignment: bool = True
17-
validate_all: bool = True
18-
underscore_attrs_are_private: bool = True
19-
extra: str = 'forbid'
20-
arbitrary_types_allowed: bool = True
21-
use_enum_values: bool = True
16+
__signature__ = {
17+
"validate_assignment": True,
18+
"validate_all": True,
19+
"underscore_attrs_are_private": True,
20+
"extra": 'forbid',
21+
"arbitrary_types_allowed": True,
22+
"use_enum_values": True
23+
}
2224

2325

2426
class GenreEnum(str, Enum):

tests/test_loaders_dumpers/models/kitchen_sink_pydantic.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ class WeakRefShimBaseModel(BaseModel):
1313
__slots__ = '__weakref__'
1414

1515
class ConfiguredBaseModel(WeakRefShimBaseModel):
16-
validate_assignment: bool = True
17-
validate_all: bool = True
18-
underscore_attrs_are_private: bool = True
19-
extra: str = 'forbid'
20-
arbitrary_types_allowed: bool = True
21-
use_enum_values: bool = True
16+
__signature__ = {
17+
"validate_assignment": True,
18+
"validate_all": True,
19+
"underscore_attrs_are_private": True,
20+
"extra": 'forbid',
21+
"arbitrary_types_allowed": True,
22+
"use_enum_values": True
23+
}
2224

2325

2426
class FamilialRelationshipType(str, Enum):

0 commit comments

Comments
 (0)