[python] Fixes Response TypeError (#14299)

* Fix and sample regen

* Response with only header added, sample regnerated
This commit is contained in:
Justin Black
2022-12-20 12:42:10 -08:00
committed by GitHub
parent 5300bff6d9
commit 45b1f91807
8 changed files with 109 additions and 16 deletions

View File

@@ -800,14 +800,14 @@ class MediaType:
@dataclass
class ApiResponse:
response: urllib3.HTTPResponse
body: typing.Union[Unset, Schema]
headers: typing.Union[Unset, typing.List[HeaderParameter]]
body: typing.Union[Unset, Schema] = unset
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
def __init__(
self,
response: urllib3.HTTPResponse,
body: typing.Union[Unset, typing.Type[Schema]],
headers: typing.Union[Unset, typing.List[HeaderParameter]]
body: typing.Union[Unset, Schema] = unset,
headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset
):
"""
pycharm needs this to prevent 'Unexpected argument' warnings