Skip to content

Commit d5d2eb2

Browse files
committed
chore: Regen snapshots
1 parent 21586e0 commit d5d2eb2

File tree

3 files changed

+31
-31
lines changed

3 files changed

+31
-31
lines changed

end_to_end_tests/golden-record/my_test_api_client/api/default/get_models_oneof_with_required_const.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from http import HTTPStatus
2-
from typing import Any, Dict, Optional, Union
2+
from typing import Any, Optional, Union
33

44
import httpx
55

@@ -14,8 +14,8 @@
1414
from ...types import Response
1515

1616

17-
def _get_kwargs() -> Dict[str, Any]:
18-
_kwargs: Dict[str, Any] = {
17+
def _get_kwargs() -> dict[str, Any]:
18+
_kwargs: dict[str, Any] = {
1919
"method": "get",
2020
"url": "/models/oneof-with-required-const",
2121
}

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast
1+
from typing import Any, Literal, TypeVar, Union, cast
22

33
from attrs import define as _attrs_define
44
from attrs import field as _attrs_field
@@ -12,24 +12,24 @@
1212
class GetModelsOneofWithRequiredConstResponse200Type0:
1313
"""
1414
Attributes:
15-
type (Literal['alpha']):
15+
type_ (Literal['alpha']):
1616
color (Union[Unset, str]):
1717
"""
1818

19-
type: Literal["alpha"]
19+
type_: Literal["alpha"]
2020
color: Union[Unset, str] = UNSET
21-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
21+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
2222

23-
def to_dict(self) -> Dict[str, Any]:
24-
type = self.type
23+
def to_dict(self) -> dict[str, Any]:
24+
type_ = self.type_
2525

2626
color = self.color
2727

28-
field_dict: Dict[str, Any] = {}
28+
field_dict: dict[str, Any] = {}
2929
field_dict.update(self.additional_properties)
3030
field_dict.update(
3131
{
32-
"type": type,
32+
"type": type_,
3333
}
3434
)
3535
if color is not UNSET:
@@ -38,24 +38,24 @@ def to_dict(self) -> Dict[str, Any]:
3838
return field_dict
3939

4040
@classmethod
41-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
41+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
4242
d = src_dict.copy()
43-
type = cast(Literal["alpha"], d.pop("type"))
44-
if type != "alpha":
45-
raise ValueError(f"type must match const 'alpha', got '{type}'")
43+
type_ = cast(Literal["alpha"], d.pop("type"))
44+
if type_ != "alpha":
45+
raise ValueError(f"type must match const 'alpha', got '{type_}'")
4646

4747
color = d.pop("color", UNSET)
4848

4949
get_models_oneof_with_required_const_response_200_type_0 = cls(
50-
type=type,
50+
type_=type_,
5151
color=color,
5252
)
5353

5454
get_models_oneof_with_required_const_response_200_type_0.additional_properties = d
5555
return get_models_oneof_with_required_const_response_200_type_0
5656

5757
@property
58-
def additional_keys(self) -> List[str]:
58+
def additional_keys(self) -> list[str]:
5959
return list(self.additional_properties.keys())
6060

6161
def __getitem__(self, key: str) -> Any:

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Dict, List, Literal, Type, TypeVar, Union, cast
1+
from typing import Any, Literal, TypeVar, Union, cast
22

33
from attrs import define as _attrs_define
44
from attrs import field as _attrs_field
@@ -12,24 +12,24 @@
1212
class GetModelsOneofWithRequiredConstResponse200Type1:
1313
"""
1414
Attributes:
15-
type (Literal['beta']):
15+
type_ (Literal['beta']):
1616
texture (Union[Unset, str]):
1717
"""
1818

19-
type: Literal["beta"]
19+
type_: Literal["beta"]
2020
texture: Union[Unset, str] = UNSET
21-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
21+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
2222

23-
def to_dict(self) -> Dict[str, Any]:
24-
type = self.type
23+
def to_dict(self) -> dict[str, Any]:
24+
type_ = self.type_
2525

2626
texture = self.texture
2727

28-
field_dict: Dict[str, Any] = {}
28+
field_dict: dict[str, Any] = {}
2929
field_dict.update(self.additional_properties)
3030
field_dict.update(
3131
{
32-
"type": type,
32+
"type": type_,
3333
}
3434
)
3535
if texture is not UNSET:
@@ -38,24 +38,24 @@ def to_dict(self) -> Dict[str, Any]:
3838
return field_dict
3939

4040
@classmethod
41-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
41+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
4242
d = src_dict.copy()
43-
type = cast(Literal["beta"], d.pop("type"))
44-
if type != "beta":
45-
raise ValueError(f"type must match const 'beta', got '{type}'")
43+
type_ = cast(Literal["beta"], d.pop("type"))
44+
if type_ != "beta":
45+
raise ValueError(f"type must match const 'beta', got '{type_}'")
4646

4747
texture = d.pop("texture", UNSET)
4848

4949
get_models_oneof_with_required_const_response_200_type_1 = cls(
50-
type=type,
50+
type_=type_,
5151
texture=texture,
5252
)
5353

5454
get_models_oneof_with_required_const_response_200_type_1.additional_properties = d
5555
return get_models_oneof_with_required_const_response_200_type_1
5656

5757
@property
58-
def additional_keys(self) -> List[str]:
58+
def additional_keys(self) -> list[str]:
5959
return list(self.additional_properties.keys())
6060

6161
def __getitem__(self, key: str) -> Any:

0 commit comments

Comments
 (0)