Skip to content

Commit 46997d3

Browse files
Regen
1 parent 70d663a commit 46997d3

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
4343

4444
type = d.pop("type", UNSET)
4545

46-
type_enum: Union[Unset, AllOfSubModelTypeEnum] = UNSET
4746
_type_enum = d.pop("type_enum", UNSET)
48-
if not isinstance(_type_enum, Unset):
47+
type_enum: Union[Unset, AllOfSubModelTypeEnum]
48+
if isinstance(_type_enum, Unset):
49+
type_enum = UNSET
50+
else:
4951
type_enum = AllOfSubModelTypeEnum(_type_enum)
5052

5153
all_of_sub_model = cls(

end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,18 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
4545
d = src_dict.copy()
4646
another_sub_property = d.pop("another_sub_property", UNSET)
4747

48-
type: Union[Unset, AnotherAllOfSubModelType] = UNSET
4948
_type = d.pop("type", UNSET)
50-
if not isinstance(_type, Unset):
49+
type: Union[Unset, AnotherAllOfSubModelType]
50+
if isinstance(_type, Unset):
51+
type = UNSET
52+
else:
5153
type = AnotherAllOfSubModelType(_type)
5254

53-
type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET
5455
_type_enum = d.pop("type_enum", UNSET)
55-
if not isinstance(_type_enum, Unset):
56+
type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum]
57+
if isinstance(_type_enum, Unset):
58+
type_enum = UNSET
59+
else:
5660
type_enum = AnotherAllOfSubModelTypeEnum(_type_enum)
5761

5862
another_all_of_sub_model = cls(

end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
5050
d = src_dict.copy()
5151
a_sub_property = d.pop("a_sub_property", UNSET)
5252

53-
type: Union[Unset, AnotherAllOfSubModelType] = UNSET
5453
_type = d.pop("type", UNSET)
55-
if not isinstance(_type, Unset):
54+
type: Union[Unset, AnotherAllOfSubModelType]
55+
if isinstance(_type, Unset):
56+
type = UNSET
57+
else:
5658
type = AnotherAllOfSubModelType(_type)
5759

58-
type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET
5960
_type_enum = d.pop("type_enum", UNSET)
60-
if not isinstance(_type_enum, Unset):
61+
type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum]
62+
if isinstance(_type_enum, Unset):
63+
type_enum = UNSET
64+
else:
6165
type_enum = AnotherAllOfSubModelTypeEnum(_type_enum)
6266

6367
another_sub_property = d.pop("another_sub_property", UNSET)

0 commit comments

Comments
 (0)