diff --git a/.chronus/changes/auto-iscai-msft-python-msrestGeneration-2025-9-11-14-13-14.md b/.chronus/changes/auto-iscai-msft-python-msrestGeneration-2025-9-11-14-13-14.md new file mode 100644 index 00000000000..66a8adc4d8c --- /dev/null +++ b/.chronus/changes/auto-iscai-msft-python-msrestGeneration-2025-9-11-14-13-14.md @@ -0,0 +1,8 @@ +--- +changeKind: internal +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Fix failsafe deserialize for swagger generation \ No newline at end of file diff --git a/packages/autorest.python/package.json b/packages/autorest.python/package.json index db80c29d5d5..42586fff836 100644 --- a/packages/autorest.python/package.json +++ b/packages/autorest.python/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.python/blob/main/README.md", "dependencies": { - "@typespec/http-client-python": "~0.19.1", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz", "@autorest/system-requirements": "~1.0.2", "fs-extra": "~11.2.0", "tsx": "~4.19.1" diff --git a/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/aio/operations/_operations.py b/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/aio/operations/_operations.py index c2389c35795..aaf71ae135b 100644 --- a/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/aio/operations/_operations.py +++ b/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/aio/operations/_operations.py @@ -161,7 +161,10 @@ async def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -207,7 +210,10 @@ async def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -253,7 +259,10 @@ async def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -341,7 +350,10 @@ async def put_empty(self, array_body: Union[list[str], IO[bytes]], **kwargs: Any if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -383,7 +395,10 @@ async def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -475,7 +490,10 @@ async def put_boolean_tfft(self, array_body: Union[list[bool], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -517,7 +535,10 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -563,7 +584,10 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -609,7 +633,10 @@ async def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -701,7 +728,10 @@ async def put_integer_valid(self, array_body: Union[list[int], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -743,7 +773,10 @@ async def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -789,7 +822,10 @@ async def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -835,7 +871,10 @@ async def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -927,7 +966,10 @@ async def put_long_valid(self, array_body: Union[list[int], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -969,7 +1011,10 @@ async def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1015,7 +1060,10 @@ async def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1061,7 +1109,10 @@ async def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1153,7 +1204,10 @@ async def put_float_valid(self, array_body: Union[list[float], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1195,7 +1249,10 @@ async def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1241,7 +1298,10 @@ async def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1287,7 +1347,10 @@ async def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1379,7 +1442,10 @@ async def put_double_valid(self, array_body: Union[list[float], IO[bytes]], **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1421,7 +1487,10 @@ async def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1467,7 +1536,10 @@ async def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1513,7 +1585,10 @@ async def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1605,7 +1680,10 @@ async def put_string_valid(self, array_body: Union[list[str], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1647,7 +1725,10 @@ async def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1742,7 +1823,10 @@ async def put_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1784,7 +1868,10 @@ async def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1879,7 +1966,10 @@ async def put_string_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1921,7 +2011,10 @@ async def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1967,7 +2060,10 @@ async def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2014,7 +2110,10 @@ async def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2109,7 +2208,10 @@ async def put_uuid_valid(self, array_body: Union[list[str], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2151,7 +2253,10 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2197,7 +2302,10 @@ async def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2289,7 +2397,10 @@ async def put_date_valid(self, array_body: Union[list[datetime.date], IO[bytes]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2331,7 +2442,10 @@ async def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2377,7 +2491,10 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2424,7 +2541,10 @@ async def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2519,7 +2639,10 @@ async def put_date_time_valid(self, array_body: Union[list[datetime.datetime], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2561,7 +2684,10 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2607,7 +2733,10 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2654,7 +2783,10 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -2751,7 +2883,10 @@ async def put_date_time_rfc1123_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2793,7 +2928,10 @@ async def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -2885,7 +3023,10 @@ async def put_duration_valid(self, array_body: Union[list[datetime.timedelta], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2928,7 +3069,10 @@ async def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3023,7 +3167,10 @@ async def put_byte_valid(self, array_body: Union[list[bytes], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3065,7 +3212,10 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3112,7 +3262,10 @@ async def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -3158,7 +3311,10 @@ async def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3204,7 +3360,10 @@ async def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3251,7 +3410,10 @@ async def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3298,7 +3460,10 @@ async def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3345,7 +3510,10 @@ async def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3440,7 +3608,10 @@ async def put_complex_valid(self, array_body: Union[list[_models.Product], IO[by if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3482,7 +3653,10 @@ async def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3528,7 +3702,10 @@ async def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3574,7 +3751,10 @@ async def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3620,7 +3800,10 @@ async def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3666,7 +3849,10 @@ async def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3758,7 +3944,10 @@ async def put_array_valid(self, array_body: Union[list[list[str]], IO[bytes]], * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3800,7 +3989,10 @@ async def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3846,7 +4038,10 @@ async def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3893,7 +4088,10 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3940,7 +4138,10 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3987,7 +4188,10 @@ async def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4082,7 +4286,10 @@ async def put_dictionary_valid(self, array_body: Union[list[dict[str, str]], IO[ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/operations/_operations.py b/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/operations/_operations.py index 66ac0cf3992..c7e81e7c258 100644 --- a/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/operations/_operations.py +++ b/packages/autorest.python/samples/specification/azure-test/test/azure-test/azure/test/_generated/operations/_operations.py @@ -1113,7 +1113,10 @@ def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1159,7 +1162,10 @@ def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1205,7 +1211,10 @@ def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1295,7 +1304,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1337,7 +1349,10 @@ def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1429,7 +1444,10 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1471,7 +1489,10 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1517,7 +1538,10 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1563,7 +1587,10 @@ def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1657,7 +1684,10 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1699,7 +1729,10 @@ def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1745,7 +1778,10 @@ def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1791,7 +1827,10 @@ def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1881,7 +1920,10 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1923,7 +1965,10 @@ def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1969,7 +2014,10 @@ def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -2015,7 +2063,10 @@ def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2107,7 +2158,10 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2149,7 +2203,10 @@ def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2195,7 +2252,10 @@ def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2241,7 +2301,10 @@ def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2333,7 +2396,10 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2375,7 +2441,10 @@ def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2421,7 +2490,10 @@ def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2467,7 +2539,10 @@ def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2557,7 +2632,10 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2599,7 +2677,10 @@ def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2692,7 +2773,10 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2734,7 +2818,10 @@ def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.Enum0] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2829,7 +2916,10 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2871,7 +2961,10 @@ def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2917,7 +3010,10 @@ def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2964,7 +3060,10 @@ def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3057,7 +3156,10 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3099,7 +3201,10 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3145,7 +3250,10 @@ def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3237,7 +3345,10 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3279,7 +3390,10 @@ def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3325,7 +3439,10 @@ def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3372,7 +3489,10 @@ def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3469,7 +3589,10 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3511,7 +3634,10 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3557,7 +3683,10 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3604,7 +3733,10 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -3701,7 +3833,10 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3743,7 +3878,10 @@ def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -3837,7 +3975,10 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3880,7 +4021,10 @@ def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3973,7 +4117,10 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4015,7 +4162,10 @@ def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -4062,7 +4212,10 @@ def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -4108,7 +4261,10 @@ def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4154,7 +4310,10 @@ def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4201,7 +4360,10 @@ def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4248,7 +4410,10 @@ def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4295,7 +4460,10 @@ def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4392,7 +4560,10 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4434,7 +4605,10 @@ def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4480,7 +4654,10 @@ def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4526,7 +4703,10 @@ def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4572,7 +4752,10 @@ def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4618,7 +4801,10 @@ def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4710,7 +4896,10 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4752,7 +4941,10 @@ def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4798,7 +4990,10 @@ def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4845,7 +5040,10 @@ def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4892,7 +5090,10 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4939,7 +5140,10 @@ def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -5036,7 +5240,10 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py index 213662677e4..345f4c6f655 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/aio/operations/_duration_operations.py @@ -94,7 +94,10 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -147,7 +150,10 @@ async def put_positive_duration(self, duration_body: datetime.timedelta, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -189,7 +195,10 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -235,7 +244,10 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py index 0892f8ada13..881b7aba931 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureBodyDuration/bodyduration/operations/_duration_operations.py @@ -150,7 +150,10 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -205,7 +208,10 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -247,7 +253,10 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -293,7 +302,10 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py index a66b5b9f520..c1679ec1724 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/aio/operations/_parameter_grouping_operations.py @@ -120,7 +120,10 @@ async def post_required( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -177,7 +180,10 @@ async def post_optional( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -237,7 +243,10 @@ async def post_reserved_words( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -307,7 +316,10 @@ async def post_multi_param_groups( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -361,7 +373,10 @@ async def post_shared_parameter_group_object( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -414,7 +429,10 @@ async def group_with_constant(self, grouper: Optional[_models.Grouper] = None, * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py index 86c897799a9..c603478f393 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureParameterGrouping/azureparametergrouping/operations/_parameter_grouping_operations.py @@ -264,7 +264,10 @@ def post_required( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -321,7 +324,10 @@ def post_optional( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -381,7 +387,10 @@ def post_reserved_words( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -451,7 +460,10 @@ def post_multi_param_groups( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -505,7 +517,10 @@ def post_shared_parameter_group_object( # pylint: disable=inconsistent-return-s if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -560,7 +575,10 @@ def group_with_constant( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py index aca50728146..a69b3cf84ce 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/aio/operations/_auto_rest_report_service_for_azure_operations.py @@ -76,7 +76,10 @@ async def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py index 2acf69a3c33..baf98156b9f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureReport/azurereport/operations/_auto_rest_report_service_for_azure_operations.py @@ -98,7 +98,10 @@ def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> dict[str if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py index 68ddfb34215..1e0878c12cc 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_default_operations.py @@ -97,7 +97,10 @@ async def get_method_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -141,7 +144,10 @@ async def get_method_global_not_provided_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -185,7 +191,10 @@ async def get_path_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -229,7 +238,10 @@ async def get_swagger_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py index 30203d7f213..3d5fb06788a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_api_version_local_operations.py @@ -97,7 +97,10 @@ async def get_method_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -143,7 +146,10 @@ async def get_method_local_null(self, api_version: Optional[str] = None, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -187,7 +193,10 @@ async def get_path_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -231,7 +240,10 @@ async def get_swagger_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py index 0e9501d49b1..46a89d89084 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_header_operations.py @@ -97,7 +97,10 @@ async def custom_named_request_id(self, foo_client_request_id: str, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -155,7 +158,10 @@ async def custom_named_request_id_param_grouping( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -203,7 +209,10 @@ async def custom_named_request_id_head(self, foo_client_request_id: str, **kwarg if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py index d6add7e1d61..a140dc4dc30 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_odata_operations.py @@ -101,7 +101,10 @@ async def get_with_filter( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py index fb3a7247aaa..91b86fa8f5d 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_skip_url_encoding_operations.py @@ -101,7 +101,10 @@ async def get_method_path_valid(self, unencoded_path_param: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -146,7 +149,10 @@ async def get_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -190,7 +196,10 @@ async def get_swagger_path_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -235,7 +244,10 @@ async def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -280,7 +292,10 @@ async def get_method_query_null(self, q1: Optional[str] = None, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -325,7 +340,10 @@ async def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -369,7 +387,10 @@ async def get_swagger_query_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py index 1187e2c6be4..5d035eed193 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_credentials_operations.py @@ -98,7 +98,10 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -142,7 +145,10 @@ async def post_method_global_null(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -188,7 +194,10 @@ async def post_method_global_not_provided_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +241,10 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -276,7 +288,10 @@ async def post_swagger_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py index 6f9094f11e7..af874eb9aba 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_subscription_in_method_operations.py @@ -99,7 +99,10 @@ async def post_method_local_valid(self, subscription_id: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -146,7 +149,10 @@ async def post_method_local_null(self, subscription_id: str, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -193,7 +199,10 @@ async def post_path_local_valid(self, subscription_id: str, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -240,7 +249,10 @@ async def post_swagger_local_valid(self, subscription_id: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py index 041f1e6e6d2..ba657a2687f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/aio/operations/_xms_client_request_id_operations.py @@ -136,7 +136,10 @@ async def param_get(self, x_ms_client_request_id: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py index b19ee51bb5d..3f5d62fdd09 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_default_operations.py @@ -171,7 +171,10 @@ def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -217,7 +220,10 @@ def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -261,7 +267,10 @@ def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=incon if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -305,7 +314,10 @@ def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py index f721fd236d0..b6dc45c6769 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_api_version_local_operations.py @@ -169,7 +169,10 @@ def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -217,7 +220,10 @@ def get_method_local_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -261,7 +267,10 @@ def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=incons if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -305,7 +314,10 @@ def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py index 74d8d4e9a53..67a8015e1af 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_header_operations.py @@ -146,7 +146,10 @@ def custom_named_request_id( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -204,7 +207,10 @@ def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-retu if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -252,7 +258,10 @@ def custom_named_request_id_head(self, foo_client_request_id: str, **kwargs: Any if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py index 5fcb30d4b0f..ef3ce9bbf35 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_odata_operations.py @@ -128,7 +128,10 @@ def get_with_filter( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py index 5aa0bf41121..0d832c7b38a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_skip_url_encoding_operations.py @@ -228,7 +228,10 @@ def get_method_path_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -275,7 +278,10 @@ def get_path_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -319,7 +325,10 @@ def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -364,7 +373,10 @@ def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -411,7 +423,10 @@ def get_method_query_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -456,7 +471,10 @@ def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: disab if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -500,7 +518,10 @@ def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py index 4e9bc01921c..2c29454191e 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_credentials_operations.py @@ -209,7 +209,10 @@ def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -253,7 +256,10 @@ def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -301,7 +307,10 @@ def post_method_global_not_provided_valid( # pylint: disable=inconsistent-retur if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -345,7 +354,10 @@ def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -389,7 +401,10 @@ def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py index bcd96469b90..d4f58411f09 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_subscription_in_method_operations.py @@ -184,7 +184,10 @@ def post_method_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -233,7 +236,10 @@ def post_method_local_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -282,7 +288,10 @@ def post_path_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -331,7 +340,10 @@ def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py index d2110790aaf..d75dcfb2389 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/AzureSpecials/azurespecialproperties/operations/_xms_client_request_id_operations.py @@ -162,7 +162,10 @@ def param_get( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py index 2911e0b68b4..3e6aafb0d8f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py @@ -94,7 +94,10 @@ async def get_empty(self, account_name: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py index 1718f870158..ae66e30f4a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py @@ -110,7 +110,10 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py index abad33b79da..933073e27a3 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/aio/operations/_lro_with_paramaterized_endpoints_operations.py @@ -82,7 +82,10 @@ async def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-to except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -196,7 +199,10 @@ async def _poll_with_constant_parameterized_endpoints_initial( # pylint: disabl except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py index 5b400776610..3faa72ad9a7 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/LroWithParameterizedEndpoints/lrowithparameterizedendpoints/operations/_lro_with_paramaterized_endpoints_operations.py @@ -118,7 +118,10 @@ def _poll_with_parameterized_endpoints_initial( # pylint: disable=name-too-long except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -232,7 +235,10 @@ def _poll_with_constant_parameterized_endpoints_initial( # pylint: disable=name except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py index 075401490c1..30ee21effdb 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_default_operations.py @@ -93,7 +93,10 @@ async def get_method_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -137,7 +140,10 @@ async def get_method_global_not_provided_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -181,7 +187,10 @@ async def get_path_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -225,7 +234,10 @@ async def get_swagger_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py index b2ce6d96903..57e70ad750a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_api_version_local_operations.py @@ -93,7 +93,10 @@ async def get_method_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -139,7 +142,10 @@ async def get_method_local_null(self, api_version: Optional[str] = None, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -183,7 +189,10 @@ async def get_path_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -227,7 +236,10 @@ async def get_swagger_local_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py index e748534a5ec..c90b0029009 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_header_operations.py @@ -93,7 +93,10 @@ async def custom_named_request_id(self, foo_client_request_id: str, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -151,7 +154,10 @@ async def custom_named_request_id_param_grouping( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -199,7 +205,10 @@ async def custom_named_request_id_head(self, foo_client_request_id: str, **kwarg if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py index f15960be9ef..3da3425bace 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_odata_operations.py @@ -97,7 +97,10 @@ async def get_with_filter( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py index 77c381ab7a4..e38244e0fb1 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_skip_url_encoding_operations.py @@ -97,7 +97,10 @@ async def get_method_path_valid(self, unencoded_path_param: str, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -142,7 +145,10 @@ async def get_path_valid(self, unencoded_path_param: str, **kwargs: Any) -> None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -186,7 +192,10 @@ async def get_swagger_path_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -231,7 +240,10 @@ async def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -276,7 +288,10 @@ async def get_method_query_null(self, q1: Optional[str] = None, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -321,7 +336,10 @@ async def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -365,7 +383,10 @@ async def get_swagger_query_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py index 0d436696d3a..8e1e6484469 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_credentials_operations.py @@ -94,7 +94,10 @@ async def post_method_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -138,7 +141,10 @@ async def post_method_global_null(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -184,7 +190,10 @@ async def post_method_global_not_provided_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -228,7 +237,10 @@ async def post_path_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -272,7 +284,10 @@ async def post_swagger_global_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py index 8fc164456e0..f5beed0dd54 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_subscription_in_method_operations.py @@ -95,7 +95,10 @@ async def post_method_local_valid(self, subscription_id: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -142,7 +145,10 @@ async def post_method_local_null(self, subscription_id: str, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -189,7 +195,10 @@ async def post_path_local_valid(self, subscription_id: str, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -236,7 +245,10 @@ async def post_swagger_local_valid(self, subscription_id: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py index 74694f8c85b..6b45d57caca 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/aio/operations/_xms_client_request_id_operations.py @@ -132,7 +132,10 @@ async def param_get(self, x_ms_client_request_id: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py index eaf4d1f8c3b..07ff58e3225 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_default_operations.py @@ -168,7 +168,10 @@ def get_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -214,7 +217,10 @@ def get_method_global_not_provided_valid( # pylint: disable=inconsistent-return if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -258,7 +264,10 @@ def get_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=incon if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -302,7 +311,10 @@ def get_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py index 28de863fbe9..d81b23605e5 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_api_version_local_operations.py @@ -166,7 +166,10 @@ def get_method_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -214,7 +217,10 @@ def get_method_local_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -258,7 +264,10 @@ def get_path_local_valid(self, **kwargs: Any) -> None: # pylint: disable=incons if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -302,7 +311,10 @@ def get_swagger_local_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py index 041bae8b162..424c0fec55c 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_header_operations.py @@ -143,7 +143,10 @@ def custom_named_request_id( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -201,7 +204,10 @@ def custom_named_request_id_param_grouping( # pylint: disable=inconsistent-retu if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -251,7 +257,10 @@ def custom_named_request_id_head( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py index 7a20da26659..0841036b389 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_odata_operations.py @@ -125,7 +125,10 @@ def get_with_filter( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py index 1a860c20c9f..b94156be68b 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_skip_url_encoding_operations.py @@ -225,7 +225,10 @@ def get_method_path_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -272,7 +275,10 @@ def get_path_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -316,7 +322,10 @@ def get_swagger_path_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -361,7 +370,10 @@ def get_method_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -408,7 +420,10 @@ def get_method_query_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -453,7 +468,10 @@ def get_path_query_valid(self, q1: str, **kwargs: Any) -> None: # pylint: disab if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -497,7 +515,10 @@ def get_swagger_query_valid(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py index f6f3fc1ab6c..b0cad726738 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_credentials_operations.py @@ -206,7 +206,10 @@ def post_method_global_valid(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -250,7 +253,10 @@ def post_method_global_null(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -298,7 +304,10 @@ def post_method_global_not_provided_valid( # pylint: disable=inconsistent-retur if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -342,7 +351,10 @@ def post_path_global_valid(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -386,7 +398,10 @@ def post_swagger_global_valid(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py index 125f2efda2c..e0e29711e5a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_subscription_in_method_operations.py @@ -181,7 +181,10 @@ def post_method_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -230,7 +233,10 @@ def post_method_local_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -279,7 +285,10 @@ def post_path_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -328,7 +337,10 @@ def post_swagger_local_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py index 95736d63dea..62c2b498d3f 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/MixedApiVersion/mixedapiversion/operations/_xms_client_request_id_operations.py @@ -159,7 +159,10 @@ def param_get( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py index e89602fbb0d..9543631f52a 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/aio/operations/_group_operations.py @@ -93,7 +93,10 @@ async def get_sample_resource_group(self, resource_group_name: str, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("SampleResourceGroup", pipeline_response.http_response) diff --git a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py index 6e66746d4dc..27a95634204 100644 --- a/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py +++ b/packages/autorest.python/test/azure/legacy/Expected/AcceptanceTests/SubscriptionIdApiVersion/subscriptionidapiversion/operations/_group_operations.py @@ -122,7 +122,10 @@ def get_sample_resource_group(self, resource_group_name: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize("SampleResourceGroup", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py index 901a5584b9a..a445d672690 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/aio/operations/_pets_operations.py @@ -144,7 +144,10 @@ async def create_ap_true( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPTrue", pipeline_response.http_response) @@ -238,7 +241,10 @@ async def create_cat_ap_true( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("CatAPTrue", pipeline_response.http_response) @@ -332,7 +338,10 @@ async def create_ap_object( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPObject", pipeline_response.http_response) @@ -426,7 +435,10 @@ async def create_ap_string( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPString", pipeline_response.http_response) @@ -520,7 +532,10 @@ async def create_ap_in_properties( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPInProperties", pipeline_response.http_response) @@ -620,7 +635,10 @@ async def create_ap_in_properties_with_ap_string( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPInPropertiesWithAPString", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py index 55b85684269..0206f55b22c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/AdditionalProperties/additionalproperties/operations/_pets_operations.py @@ -241,7 +241,10 @@ def create_ap_true( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPTrue", pipeline_response.http_response) @@ -335,7 +338,10 @@ def create_cat_ap_true( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("CatAPTrue", pipeline_response.http_response) @@ -429,7 +435,10 @@ def create_ap_object( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPObject", pipeline_response.http_response) @@ -523,7 +532,10 @@ def create_ap_string( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPString", pipeline_response.http_response) @@ -617,7 +629,10 @@ def create_ap_in_properties( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPInProperties", pipeline_response.http_response) @@ -717,7 +732,10 @@ def create_ap_in_properties_with_ap_string( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAPInPropertiesWithAPString", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py index ffb52176f70..dfca955baf8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/aio/operations/_array_operations.py @@ -161,7 +161,10 @@ async def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -207,7 +210,10 @@ async def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -253,7 +259,10 @@ async def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -341,7 +350,10 @@ async def put_empty(self, array_body: Union[list[str], IO[bytes]], **kwargs: Any if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -383,7 +395,10 @@ async def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -475,7 +490,10 @@ async def put_boolean_tfft(self, array_body: Union[list[bool], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -517,7 +535,10 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -563,7 +584,10 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -609,7 +633,10 @@ async def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -701,7 +728,10 @@ async def put_integer_valid(self, array_body: Union[list[int], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -743,7 +773,10 @@ async def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -789,7 +822,10 @@ async def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -835,7 +871,10 @@ async def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -927,7 +966,10 @@ async def put_long_valid(self, array_body: Union[list[int], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -969,7 +1011,10 @@ async def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1015,7 +1060,10 @@ async def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1061,7 +1109,10 @@ async def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1153,7 +1204,10 @@ async def put_float_valid(self, array_body: Union[list[float], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1195,7 +1249,10 @@ async def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1241,7 +1298,10 @@ async def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1287,7 +1347,10 @@ async def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1379,7 +1442,10 @@ async def put_double_valid(self, array_body: Union[list[float], IO[bytes]], **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1421,7 +1487,10 @@ async def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1467,7 +1536,10 @@ async def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1513,7 +1585,10 @@ async def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1605,7 +1680,10 @@ async def put_string_valid(self, array_body: Union[list[str], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1647,7 +1725,10 @@ async def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1742,7 +1823,10 @@ async def put_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1784,7 +1868,10 @@ async def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1879,7 +1966,10 @@ async def put_string_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1921,7 +2011,10 @@ async def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1967,7 +2060,10 @@ async def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2014,7 +2110,10 @@ async def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2109,7 +2208,10 @@ async def put_uuid_valid(self, array_body: Union[list[str], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2151,7 +2253,10 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2197,7 +2302,10 @@ async def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2289,7 +2397,10 @@ async def put_date_valid(self, array_body: Union[list[datetime.date], IO[bytes]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2331,7 +2442,10 @@ async def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2377,7 +2491,10 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2424,7 +2541,10 @@ async def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2519,7 +2639,10 @@ async def put_date_time_valid(self, array_body: Union[list[datetime.datetime], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2561,7 +2684,10 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2607,7 +2733,10 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2654,7 +2783,10 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -2751,7 +2883,10 @@ async def put_date_time_rfc1123_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2793,7 +2928,10 @@ async def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -2885,7 +3023,10 @@ async def put_duration_valid(self, array_body: Union[list[datetime.timedelta], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2928,7 +3069,10 @@ async def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3023,7 +3167,10 @@ async def put_byte_valid(self, array_body: Union[list[bytes], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3065,7 +3212,10 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3112,7 +3262,10 @@ async def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -3158,7 +3311,10 @@ async def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3204,7 +3360,10 @@ async def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3251,7 +3410,10 @@ async def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3298,7 +3460,10 @@ async def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3345,7 +3510,10 @@ async def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3440,7 +3608,10 @@ async def put_complex_valid(self, array_body: Union[list[_models.Product], IO[by if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3482,7 +3653,10 @@ async def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3528,7 +3702,10 @@ async def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3574,7 +3751,10 @@ async def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3620,7 +3800,10 @@ async def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3666,7 +3849,10 @@ async def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3758,7 +3944,10 @@ async def put_array_valid(self, array_body: Union[list[list[str]], IO[bytes]], * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3800,7 +3989,10 @@ async def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3846,7 +4038,10 @@ async def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3893,7 +4088,10 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3940,7 +4138,10 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3987,7 +4188,10 @@ async def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4082,7 +4286,10 @@ async def put_dictionary_valid(self, array_body: Union[list[dict[str, str]], IO[ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py index 32fe602a0bc..43b7fcd6fcd 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArray/bodyarray/operations/_array_operations.py @@ -1113,7 +1113,10 @@ def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1159,7 +1162,10 @@ def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1205,7 +1211,10 @@ def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1295,7 +1304,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1337,7 +1349,10 @@ def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1429,7 +1444,10 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1471,7 +1489,10 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1517,7 +1538,10 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1563,7 +1587,10 @@ def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1657,7 +1684,10 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1699,7 +1729,10 @@ def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1745,7 +1778,10 @@ def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1791,7 +1827,10 @@ def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1881,7 +1920,10 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1923,7 +1965,10 @@ def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1969,7 +2014,10 @@ def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -2015,7 +2063,10 @@ def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2107,7 +2158,10 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2149,7 +2203,10 @@ def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2195,7 +2252,10 @@ def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2241,7 +2301,10 @@ def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2333,7 +2396,10 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2375,7 +2441,10 @@ def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2421,7 +2490,10 @@ def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2467,7 +2539,10 @@ def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2557,7 +2632,10 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2599,7 +2677,10 @@ def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2692,7 +2773,10 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2734,7 +2818,10 @@ def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.Enum0] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2829,7 +2916,10 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2871,7 +2961,10 @@ def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2917,7 +3010,10 @@ def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2964,7 +3060,10 @@ def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3057,7 +3156,10 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3099,7 +3201,10 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3145,7 +3250,10 @@ def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3237,7 +3345,10 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3279,7 +3390,10 @@ def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3325,7 +3439,10 @@ def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3372,7 +3489,10 @@ def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3469,7 +3589,10 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3511,7 +3634,10 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3557,7 +3683,10 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3604,7 +3733,10 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -3701,7 +3833,10 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3743,7 +3878,10 @@ def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -3837,7 +3975,10 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3880,7 +4021,10 @@ def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3973,7 +4117,10 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4015,7 +4162,10 @@ def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -4062,7 +4212,10 @@ def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -4108,7 +4261,10 @@ def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4154,7 +4310,10 @@ def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4201,7 +4360,10 @@ def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4248,7 +4410,10 @@ def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4295,7 +4460,10 @@ def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4392,7 +4560,10 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4434,7 +4605,10 @@ def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4480,7 +4654,10 @@ def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4526,7 +4703,10 @@ def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4572,7 +4752,10 @@ def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4618,7 +4801,10 @@ def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4710,7 +4896,10 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4752,7 +4941,10 @@ def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4798,7 +4990,10 @@ def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4845,7 +5040,10 @@ def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4892,7 +5090,10 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4939,7 +5140,10 @@ def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -5036,7 +5240,10 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py index 26945df0c6a..c737f2258e2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/aio/operations/_array_operations.py @@ -161,7 +161,10 @@ async def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -207,7 +210,10 @@ async def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -253,7 +259,10 @@ async def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -341,7 +350,10 @@ async def put_empty(self, array_body: Union[list[str], IO[bytes]], **kwargs: Any if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -383,7 +395,10 @@ async def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -475,7 +490,10 @@ async def put_boolean_tfft(self, array_body: Union[list[bool], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -517,7 +535,10 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -563,7 +584,10 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -609,7 +633,10 @@ async def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -701,7 +728,10 @@ async def put_integer_valid(self, array_body: Union[list[int], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -743,7 +773,10 @@ async def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -789,7 +822,10 @@ async def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -835,7 +871,10 @@ async def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -927,7 +966,10 @@ async def put_long_valid(self, array_body: Union[list[int], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -969,7 +1011,10 @@ async def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1015,7 +1060,10 @@ async def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1061,7 +1109,10 @@ async def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1153,7 +1204,10 @@ async def put_float_valid(self, array_body: Union[list[float], IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1195,7 +1249,10 @@ async def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1241,7 +1298,10 @@ async def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1287,7 +1347,10 @@ async def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1379,7 +1442,10 @@ async def put_double_valid(self, array_body: Union[list[float], IO[bytes]], **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1421,7 +1487,10 @@ async def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1467,7 +1536,10 @@ async def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -1513,7 +1585,10 @@ async def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1605,7 +1680,10 @@ async def put_string_valid(self, array_body: Union[list[str], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1647,7 +1725,10 @@ async def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1742,7 +1823,10 @@ async def put_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1784,7 +1868,10 @@ async def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1879,7 +1966,10 @@ async def put_string_enum_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1921,7 +2011,10 @@ async def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -1967,7 +2060,10 @@ async def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2014,7 +2110,10 @@ async def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2109,7 +2208,10 @@ async def put_uuid_valid(self, array_body: Union[list[str], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2151,7 +2253,10 @@ async def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2197,7 +2302,10 @@ async def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2289,7 +2397,10 @@ async def put_date_valid(self, array_body: Union[list[datetime.date], IO[bytes]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2331,7 +2442,10 @@ async def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2377,7 +2491,10 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -2424,7 +2541,10 @@ async def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2519,7 +2639,10 @@ async def put_date_time_valid(self, array_body: Union[list[datetime.datetime], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2561,7 +2684,10 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2607,7 +2733,10 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -2654,7 +2783,10 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -2751,7 +2883,10 @@ async def put_date_time_rfc1123_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2793,7 +2928,10 @@ async def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -2885,7 +3023,10 @@ async def put_duration_valid(self, array_body: Union[list[datetime.timedelta], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2928,7 +3069,10 @@ async def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3023,7 +3167,10 @@ async def put_byte_valid(self, array_body: Union[list[bytes], IO[bytes]], **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3065,7 +3212,10 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3112,7 +3262,10 @@ async def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -3158,7 +3311,10 @@ async def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3204,7 +3360,10 @@ async def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3251,7 +3410,10 @@ async def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3298,7 +3460,10 @@ async def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3345,7 +3510,10 @@ async def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -3440,7 +3608,10 @@ async def put_complex_valid(self, array_body: Union[list[_models.Product], IO[by if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3482,7 +3653,10 @@ async def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3528,7 +3702,10 @@ async def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3574,7 +3751,10 @@ async def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3620,7 +3800,10 @@ async def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3666,7 +3849,10 @@ async def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -3758,7 +3944,10 @@ async def put_array_valid(self, array_body: Union[list[list[str]], IO[bytes]], * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3800,7 +3989,10 @@ async def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3846,7 +4038,10 @@ async def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3893,7 +4088,10 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3940,7 +4138,10 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -3987,7 +4188,10 @@ async def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4082,7 +4286,10 @@ async def put_dictionary_valid(self, array_body: Union[list[dict[str, str]], IO[ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py index cabf62525d6..53ea3e0f26e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyArrayWithNamespaceFolders/vanilla/body/array/operations/_array_operations.py @@ -1113,7 +1113,10 @@ def get_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1159,7 +1162,10 @@ def get_invalid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1205,7 +1211,10 @@ def get_empty(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1295,7 +1304,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1337,7 +1349,10 @@ def get_boolean_tfft(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1429,7 +1444,10 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1471,7 +1489,10 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1517,7 +1538,10 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> list[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bool]", pipeline_response.http_response) @@ -1563,7 +1587,10 @@ def get_integer_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1657,7 +1684,10 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1699,7 +1729,10 @@ def get_int_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1745,7 +1778,10 @@ def get_int_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1791,7 +1827,10 @@ def get_long_valid(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1881,7 +1920,10 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1923,7 +1965,10 @@ def get_long_invalid_null(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -1969,7 +2014,10 @@ def get_long_invalid_string(self, **kwargs: Any) -> list[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[int]", pipeline_response.http_response) @@ -2015,7 +2063,10 @@ def get_float_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2107,7 +2158,10 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2149,7 +2203,10 @@ def get_float_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2195,7 +2252,10 @@ def get_float_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2241,7 +2301,10 @@ def get_double_valid(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2333,7 +2396,10 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2375,7 +2441,10 @@ def get_double_invalid_null(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2421,7 +2490,10 @@ def get_double_invalid_string(self, **kwargs: Any) -> list[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[float]", pipeline_response.http_response) @@ -2467,7 +2539,10 @@ def get_string_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2557,7 +2632,10 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2599,7 +2677,10 @@ def get_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.FooEnum]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2692,7 +2773,10 @@ def put_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2734,7 +2818,10 @@ def get_string_enum_valid(self, **kwargs: Any) -> list[Union[str, _models.Enum0] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2829,7 +2916,10 @@ def put_string_enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2871,7 +2961,10 @@ def get_string_with_null(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2917,7 +3010,10 @@ def get_string_with_invalid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -2964,7 +3060,10 @@ def get_uuid_valid(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3057,7 +3156,10 @@ def put_uuid_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3099,7 +3201,10 @@ def get_uuid_invalid_chars(self, **kwargs: Any) -> list[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[str]", pipeline_response.http_response) @@ -3145,7 +3250,10 @@ def get_date_valid(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3237,7 +3345,10 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3279,7 +3390,10 @@ def get_date_invalid_null(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3325,7 +3439,10 @@ def get_date_invalid_chars(self, **kwargs: Any) -> list[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[date]", pipeline_response.http_response) @@ -3372,7 +3489,10 @@ def get_date_time_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3469,7 +3589,10 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3511,7 +3634,10 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3557,7 +3683,10 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[iso-8601]", pipeline_response.http_response) @@ -3604,7 +3733,10 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> list[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[rfc-1123]", pipeline_response.http_response) @@ -3701,7 +3833,10 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3743,7 +3878,10 @@ def get_duration_valid(self, **kwargs: Any) -> list[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[duration]", pipeline_response.http_response) @@ -3837,7 +3975,10 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3880,7 +4021,10 @@ def get_byte_valid(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -3973,7 +4117,10 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4015,7 +4162,10 @@ def get_byte_invalid_null(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[bytearray]", pipeline_response.http_response) @@ -4062,7 +4212,10 @@ def get_base64_url(self, **kwargs: Any) -> list[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[base64]", pipeline_response.http_response) @@ -4108,7 +4261,10 @@ def get_complex_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4154,7 +4310,10 @@ def get_complex_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4201,7 +4360,10 @@ def get_complex_item_null(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4248,7 +4410,10 @@ def get_complex_item_empty(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4295,7 +4460,10 @@ def get_complex_valid(self, **kwargs: Any) -> list[_models.Product]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[Product]", pipeline_response.http_response) @@ -4392,7 +4560,10 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4434,7 +4605,10 @@ def get_array_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4480,7 +4654,10 @@ def get_array_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4526,7 +4703,10 @@ def get_array_item_null(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4572,7 +4752,10 @@ def get_array_item_empty(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4618,7 +4801,10 @@ def get_array_valid(self, **kwargs: Any) -> list[list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[[str]]", pipeline_response.http_response) @@ -4710,7 +4896,10 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4752,7 +4941,10 @@ def get_dictionary_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4798,7 +4990,10 @@ def get_dictionary_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4845,7 +5040,10 @@ def get_dictionary_item_null(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4892,7 +5090,10 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -4939,7 +5140,10 @@ def get_dictionary_valid(self, **kwargs: Any) -> list[dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[{str}]", pipeline_response.http_response) @@ -5036,7 +5240,10 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py index 7c97c2b5a9d..d8efe003d97 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_download_operations.py @@ -94,7 +94,10 @@ async def error_stream(self, **kwargs: Any) -> AsyncIterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py index 015dc35b59e..d63671389f8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/operations/_download_operations.py @@ -111,7 +111,10 @@ def error_stream(self, **kwargs: Any) -> Iterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py index 24565c8b992..8e21fa18ff4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/aio/operations/_bool_operations.py @@ -93,7 +93,10 @@ async def get_true(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -145,7 +148,10 @@ async def put_true(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -187,7 +193,10 @@ async def get_false(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -239,7 +248,10 @@ async def put_false(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -281,7 +293,10 @@ async def get_null(self, **kwargs: Any) -> Optional[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -327,7 +342,10 @@ async def get_invalid(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py index e16cbf15175..7b5df683ce4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyBoolean/bodyboolean/operations/_bool_operations.py @@ -180,7 +180,10 @@ def get_true(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -232,7 +235,10 @@ def put_true(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -274,7 +280,10 @@ def get_false(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -326,7 +335,10 @@ def put_false(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -368,7 +380,10 @@ def get_null(self, **kwargs: Any) -> Optional[bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -414,7 +429,10 @@ def get_invalid(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py index 5ac43aa3946..3408e62fd86 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/aio/operations/_byte_operations.py @@ -94,7 +94,10 @@ async def get_null(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -140,7 +143,10 @@ async def get_empty(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -186,7 +192,10 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -240,7 +249,10 @@ async def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -282,7 +294,10 @@ async def get_invalid(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py index c1d908c50e3..386e4ddf6d6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByte/bodybyte/operations/_byte_operations.py @@ -163,7 +163,10 @@ def get_null(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -209,7 +212,10 @@ def get_empty(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -255,7 +261,10 @@ def get_non_ascii(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -309,7 +318,10 @@ def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -351,7 +363,10 @@ def get_invalid(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py index 55e38fb68d8..1c78af182ec 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/aio/operations/_byte_operations.py @@ -92,7 +92,10 @@ async def get_null(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -138,7 +141,10 @@ async def get_empty(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -184,7 +190,10 @@ async def get_non_ascii(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -238,7 +247,10 @@ async def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -280,7 +292,10 @@ async def get_invalid(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py index 672cae431ac..b4d31528086 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyByteWithPackageName/bodybytewithpackagename/operations/_byte_operations.py @@ -161,7 +161,10 @@ def get_null(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -207,7 +210,10 @@ def get_empty(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -253,7 +259,10 @@ def get_non_ascii(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -307,7 +316,10 @@ def put_non_ascii(self, byte_body: bytes, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -349,7 +361,10 @@ def get_invalid(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py index b325efe0706..174f61c10b8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_array_operations.py @@ -95,7 +95,10 @@ async def get_valid(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) @@ -149,7 +152,10 @@ async def put_valid(self, array: Optional[list[str]] = None, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -191,7 +197,10 @@ async def get_empty(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) @@ -245,7 +254,10 @@ async def put_empty(self, array: Optional[list[str]] = None, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -287,7 +299,10 @@ async def get_not_provided(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py index e442f83afd9..1555e2328b9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_basic_operations.py @@ -97,7 +97,10 @@ async def get_valid(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -192,7 +195,10 @@ async def put_valid(self, complex_body: Union[_models.Basic, IO[bytes]], **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -234,7 +240,10 @@ async def get_invalid(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -280,7 +289,10 @@ async def get_empty(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -326,7 +338,10 @@ async def get_null(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -372,7 +387,10 @@ async def get_not_provided(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py index 8460f45ae83..c16a98c8b83 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_dictionary_operations.py @@ -96,7 +96,10 @@ async def get_valid(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -150,7 +153,10 @@ async def put_valid(self, default_program: Optional[dict[str, str]] = None, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -192,7 +198,10 @@ async def get_empty(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -246,7 +255,10 @@ async def put_empty(self, default_program: Optional[dict[str, str]] = None, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -288,7 +300,10 @@ async def get_null(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -334,7 +349,10 @@ async def get_not_provided(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py index 873f77f823c..caed60a5870 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_inheritance_operations.py @@ -90,7 +90,10 @@ async def get_valid(self, **kwargs: Any) -> _models.Siamese: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Siamese", pipeline_response.http_response) @@ -189,7 +192,10 @@ async def put_valid(self, complex_body: Union[_models.Siamese, IO[bytes]], **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py index bfc2e9d465e..701519ad161 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphicrecursive_operations.py @@ -90,7 +90,10 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Fish", pipeline_response.http_response) @@ -338,7 +341,10 @@ async def put_valid(self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py index 963ad8112d6..4204e2c6de6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_polymorphism_operations.py @@ -100,7 +100,10 @@ async def get_valid(self, **kwargs: Any) -> _models.Fish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Fish", pipeline_response.http_response) @@ -288,7 +291,10 @@ async def put_valid(self, complex_body: Union[_models.Fish, IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -330,7 +336,10 @@ async def get_dot_syntax(self, **kwargs: Any) -> _models.DotFish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFish", pipeline_response.http_response) @@ -378,7 +387,10 @@ async def get_composed_with_discriminator(self, **kwargs: Any) -> _models.DotFis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFishMarket", pipeline_response.http_response) @@ -426,7 +438,10 @@ async def get_composed_without_discriminator(self, **kwargs: Any) -> _models.Dot if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFishMarket", pipeline_response.http_response) @@ -473,7 +488,10 @@ async def get_complicated(self, **kwargs: Any) -> _models.Salmon: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Salmon", pipeline_response.http_response) @@ -568,7 +586,10 @@ async def put_complicated(self, complex_body: Union[_models.Salmon, IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -658,7 +679,10 @@ async def put_missing_discriminator( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Salmon", pipeline_response.http_response) @@ -831,7 +855,10 @@ async def put_valid_missing_required(self, complex_body: Union[_models.Fish, IO[ if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py index fa81a60510b..e309ed2c097 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_primitive_operations.py @@ -115,7 +115,10 @@ async def get_int(self, **kwargs: Any) -> _models.IntWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("IntWrapper", pipeline_response.http_response) @@ -206,7 +209,10 @@ async def put_int(self, complex_body: Union[_models.IntWrapper, IO[bytes]], **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -248,7 +254,10 @@ async def get_long(self, **kwargs: Any) -> _models.LongWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("LongWrapper", pipeline_response.http_response) @@ -339,7 +348,10 @@ async def put_long(self, complex_body: Union[_models.LongWrapper, IO[bytes]], ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -381,7 +393,10 @@ async def get_float(self, **kwargs: Any) -> _models.FloatWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("FloatWrapper", pipeline_response.http_response) @@ -474,7 +489,10 @@ async def put_float(self, complex_body: Union[_models.FloatWrapper, IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -516,7 +534,10 @@ async def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DoubleWrapper", pipeline_response.http_response) @@ -612,7 +633,10 @@ async def put_double(self, complex_body: Union[_models.DoubleWrapper, IO[bytes]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -654,7 +678,10 @@ async def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("BooleanWrapper", pipeline_response.http_response) @@ -745,7 +772,10 @@ async def put_bool(self, complex_body: Union[_models.BooleanWrapper, IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -787,7 +817,10 @@ async def get_string(self, **kwargs: Any) -> _models.StringWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("StringWrapper", pipeline_response.http_response) @@ -880,7 +913,10 @@ async def put_string(self, complex_body: Union[_models.StringWrapper, IO[bytes]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -922,7 +958,10 @@ async def get_date(self, **kwargs: Any) -> _models.DateWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DateWrapper", pipeline_response.http_response) @@ -1013,7 +1052,10 @@ async def put_date(self, complex_body: Union[_models.DateWrapper, IO[bytes]], ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1055,7 +1097,10 @@ async def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DatetimeWrapper", pipeline_response.http_response) @@ -1150,7 +1195,10 @@ async def put_date_time(self, complex_body: Union[_models.DatetimeWrapper, IO[by if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1192,7 +1240,10 @@ async def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123W if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Datetimerfc1123Wrapper", pipeline_response.http_response) @@ -1289,7 +1340,10 @@ async def put_date_time_rfc1123( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1331,7 +1385,10 @@ async def get_duration(self, **kwargs: Any) -> _models.DurationWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DurationWrapper", pipeline_response.http_response) @@ -1385,7 +1442,10 @@ async def put_duration(self, field: Optional[datetime.timedelta] = None, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1427,7 +1487,10 @@ async def get_byte(self, **kwargs: Any) -> _models.ByteWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ByteWrapper", pipeline_response.http_response) @@ -1481,7 +1544,10 @@ async def put_byte(self, field: Optional[bytes] = None, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py index 56415bcb143..0580faadd94 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/aio/operations/_readonlyproperty_operations.py @@ -89,7 +89,10 @@ async def get_valid(self, **kwargs: Any) -> _models.ReadonlyObj: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ReadonlyObj", pipeline_response.http_response) @@ -143,7 +146,10 @@ async def put_valid(self, size: Optional[int] = None, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py index cd49123f188..426c752ef71 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_array_operations.py @@ -166,7 +166,10 @@ def get_valid(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) @@ -222,7 +225,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -264,7 +270,10 @@ def get_empty(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) @@ -320,7 +329,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -362,7 +374,10 @@ def get_not_provided(self, **kwargs: Any) -> _models.ArrayWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ArrayWrapper", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py index 32e3d026dcc..450eb1cbfb0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_basic_operations.py @@ -183,7 +183,10 @@ def get_valid(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -276,7 +279,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -318,7 +324,10 @@ def get_invalid(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -364,7 +373,10 @@ def get_empty(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -410,7 +422,10 @@ def get_null(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) @@ -456,7 +471,10 @@ def get_not_provided(self, **kwargs: Any) -> _models.Basic: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Basic", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py index ca7a8baf0f0..86b60eca421 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_dictionary_operations.py @@ -180,7 +180,10 @@ def get_valid(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -236,7 +239,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -278,7 +284,10 @@ def get_empty(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -334,7 +343,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -376,7 +388,10 @@ def get_null(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) @@ -422,7 +437,10 @@ def get_not_provided(self, **kwargs: Any) -> _models.DictionaryWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DictionaryWrapper", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py index ef0bb0241ac..6470bf0ece0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_inheritance_operations.py @@ -122,7 +122,10 @@ def get_valid(self, **kwargs: Any) -> _models.Siamese: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Siamese", pipeline_response.http_response) @@ -221,7 +224,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py index 370bb656e27..2af3ab1ad24 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphicrecursive_operations.py @@ -122,7 +122,10 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Fish", pipeline_response.http_response) @@ -368,7 +371,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py index bd7cf017e88..926fe7d031c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_polymorphism_operations.py @@ -229,7 +229,10 @@ def get_valid(self, **kwargs: Any) -> _models.Fish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Fish", pipeline_response.http_response) @@ -415,7 +418,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -457,7 +463,10 @@ def get_dot_syntax(self, **kwargs: Any) -> _models.DotFish: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFish", pipeline_response.http_response) @@ -505,7 +514,10 @@ def get_composed_with_discriminator(self, **kwargs: Any) -> _models.DotFishMarke if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFishMarket", pipeline_response.http_response) @@ -553,7 +565,10 @@ def get_composed_without_discriminator(self, **kwargs: Any) -> _models.DotFishMa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DotFishMarket", pipeline_response.http_response) @@ -600,7 +615,10 @@ def get_complicated(self, **kwargs: Any) -> _models.Salmon: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Salmon", pipeline_response.http_response) @@ -697,7 +715,10 @@ def put_complicated( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -787,7 +808,10 @@ def put_missing_discriminator( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Salmon", pipeline_response.http_response) @@ -962,7 +986,10 @@ def put_valid_missing_required( # pylint: disable=inconsistent-return-statement if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py index 58fc917917d..fb576bd558d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_primitive_operations.py @@ -434,7 +434,10 @@ def get_int(self, **kwargs: Any) -> _models.IntWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("IntWrapper", pipeline_response.http_response) @@ -527,7 +530,10 @@ def put_int( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -569,7 +575,10 @@ def get_long(self, **kwargs: Any) -> _models.LongWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("LongWrapper", pipeline_response.http_response) @@ -662,7 +671,10 @@ def put_long( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -704,7 +716,10 @@ def get_float(self, **kwargs: Any) -> _models.FloatWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("FloatWrapper", pipeline_response.http_response) @@ -797,7 +812,10 @@ def put_float( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -839,7 +857,10 @@ def get_double(self, **kwargs: Any) -> _models.DoubleWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DoubleWrapper", pipeline_response.http_response) @@ -935,7 +956,10 @@ def put_double( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -977,7 +1001,10 @@ def get_bool(self, **kwargs: Any) -> _models.BooleanWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("BooleanWrapper", pipeline_response.http_response) @@ -1070,7 +1097,10 @@ def put_bool( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1112,7 +1142,10 @@ def get_string(self, **kwargs: Any) -> _models.StringWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("StringWrapper", pipeline_response.http_response) @@ -1205,7 +1238,10 @@ def put_string( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1247,7 +1283,10 @@ def get_date(self, **kwargs: Any) -> _models.DateWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DateWrapper", pipeline_response.http_response) @@ -1340,7 +1379,10 @@ def put_date( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1382,7 +1424,10 @@ def get_date_time(self, **kwargs: Any) -> _models.DatetimeWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DatetimeWrapper", pipeline_response.http_response) @@ -1477,7 +1522,10 @@ def put_date_time( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1519,7 +1567,10 @@ def get_date_time_rfc1123(self, **kwargs: Any) -> _models.Datetimerfc1123Wrapper if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Datetimerfc1123Wrapper", pipeline_response.http_response) @@ -1616,7 +1667,10 @@ def put_date_time_rfc1123( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1658,7 +1712,10 @@ def get_duration(self, **kwargs: Any) -> _models.DurationWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("DurationWrapper", pipeline_response.http_response) @@ -1714,7 +1771,10 @@ def put_duration( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1756,7 +1816,10 @@ def get_byte(self, **kwargs: Any) -> _models.ByteWrapper: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ByteWrapper", pipeline_response.http_response) @@ -1812,7 +1875,10 @@ def put_byte( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py index f3d358da168..cc363d26b92 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyComplex/bodycomplex/operations/_readonlyproperty_operations.py @@ -121,7 +121,10 @@ def get_valid(self, **kwargs: Any) -> _models.ReadonlyObj: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ReadonlyObj", pipeline_response.http_response) @@ -177,7 +180,10 @@ def put_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py index f0d91aafca3..bdc79d0d94d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/aio/operations/_date_operations.py @@ -96,7 +96,10 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -142,7 +145,10 @@ async def get_invalid_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -188,7 +194,10 @@ async def get_overflow_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -234,7 +243,10 @@ async def get_underflow_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -287,7 +299,10 @@ async def put_max_date(self, date_body: datetime.date, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -329,7 +344,10 @@ async def get_max_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -382,7 +400,10 @@ async def put_min_date(self, date_body: datetime.date, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -424,7 +445,10 @@ async def get_min_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py index 1e6964a470f..bbe47b6b4d4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDate/bodydate/operations/_date_operations.py @@ -207,7 +207,10 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -253,7 +256,10 @@ def get_invalid_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -299,7 +305,10 @@ def get_overflow_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -345,7 +354,10 @@ def get_underflow_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -400,7 +412,10 @@ def put_max_date( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -442,7 +457,10 @@ def get_max_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) @@ -497,7 +515,10 @@ def put_min_date( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -539,7 +560,10 @@ def get_min_date(self, **kwargs: Any) -> datetime.date: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("date", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py index 8a728549d9c..d4dabaa7e09 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/aio/operations/_datetime_operations.py @@ -113,7 +113,10 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -159,7 +162,10 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -205,7 +211,10 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -251,7 +260,10 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -304,7 +316,10 @@ async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -356,7 +371,10 @@ async def put_utc_max_date_time7_digits(self, datetime_body: datetime.datetime, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -398,7 +416,10 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -444,7 +465,10 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -493,7 +517,10 @@ async def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> dateti if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -546,7 +573,10 @@ async def put_local_positive_offset_max_date_time(self, datetime_body: datetime. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -590,7 +620,10 @@ async def get_local_positive_offset_lowercase_max_date_time( # pylint: disable= if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -638,7 +671,10 @@ async def get_local_positive_offset_uppercase_max_date_time( # pylint: disable= if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -691,7 +727,10 @@ async def put_local_negative_offset_max_date_time(self, datetime_body: datetime. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -735,7 +774,10 @@ async def get_local_negative_offset_uppercase_max_date_time( # pylint: disable= if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -783,7 +825,10 @@ async def get_local_negative_offset_lowercase_max_date_time( # pylint: disable= if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -836,7 +881,10 @@ async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -878,7 +926,10 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -931,7 +982,10 @@ async def put_local_positive_offset_min_date_time(self, datetime_body: datetime. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -973,7 +1027,10 @@ async def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> dateti if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1026,7 +1083,10 @@ async def put_local_negative_offset_min_date_time(self, datetime_body: datetime. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1068,7 +1128,10 @@ async def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> dateti if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1114,7 +1177,10 @@ async def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.dat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py index 669067e716e..e1f6900d734 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTime/bodydatetime/operations/_datetime_operations.py @@ -445,7 +445,10 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -491,7 +494,10 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -537,7 +543,10 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -583,7 +592,10 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -638,7 +650,10 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -692,7 +707,10 @@ def put_utc_max_date_time7_digits( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -734,7 +752,10 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -780,7 +801,10 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -829,7 +853,10 @@ def get_utc_uppercase_max_date_time7_digits(self, **kwargs: Any) -> datetime.dat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -884,7 +911,10 @@ def put_local_positive_offset_max_date_time( # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -928,7 +958,10 @@ def get_local_positive_offset_lowercase_max_date_time( # pylint: disable=name-t if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -976,7 +1009,10 @@ def get_local_positive_offset_uppercase_max_date_time( # pylint: disable=name-t if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1031,7 +1067,10 @@ def put_local_negative_offset_max_date_time( # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1075,7 +1114,10 @@ def get_local_negative_offset_uppercase_max_date_time( # pylint: disable=name-t if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1123,7 +1165,10 @@ def get_local_negative_offset_lowercase_max_date_time( # pylint: disable=name-t if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1178,7 +1223,10 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1220,7 +1268,10 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1275,7 +1326,10 @@ def put_local_positive_offset_min_date_time( # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1317,7 +1371,10 @@ def get_local_positive_offset_min_date_time(self, **kwargs: Any) -> datetime.dat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1372,7 +1429,10 @@ def put_local_negative_offset_min_date_time( # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1414,7 +1474,10 @@ def get_local_negative_offset_min_date_time(self, **kwargs: Any) -> datetime.dat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) @@ -1460,7 +1523,10 @@ def get_local_no_offset_min_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("iso-8601", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py index a72150c712e..690ae66a7aa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/aio/operations/_datetimerfc1123_operations.py @@ -99,7 +99,10 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -145,7 +148,10 @@ async def get_invalid(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -191,7 +197,10 @@ async def get_overflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -237,7 +246,10 @@ async def get_underflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -290,7 +302,10 @@ async def put_utc_max_date_time(self, datetime_body: datetime.datetime, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -332,7 +347,10 @@ async def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -378,7 +396,10 @@ async def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -431,7 +452,10 @@ async def put_utc_min_date_time(self, datetime_body: datetime.datetime, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -473,7 +497,10 @@ async def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py index 6ab1f7f7a84..dd9bfa41eff 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDateTimeRfc1123/bodydatetimerfc1123/operations/_datetimerfc1123_operations.py @@ -223,7 +223,10 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -269,7 +272,10 @@ def get_invalid(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -315,7 +321,10 @@ def get_overflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -361,7 +370,10 @@ def get_underflow(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -416,7 +428,10 @@ def put_utc_max_date_time( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -458,7 +473,10 @@ def get_utc_lowercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -504,7 +522,10 @@ def get_utc_uppercase_max_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) @@ -559,7 +580,10 @@ def put_utc_min_date_time( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -601,7 +625,10 @@ def get_utc_min_date_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("rfc-1123", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py index 35f0ca7b3ed..a128859945f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/aio/operations/_dictionary_operations.py @@ -157,7 +157,10 @@ async def get_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -203,7 +206,10 @@ async def get_empty(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -293,7 +299,10 @@ async def put_empty(self, array_body: Union[dict[str, str], IO[bytes]], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -335,7 +344,10 @@ async def get_null_value(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -381,7 +393,10 @@ async def get_null_key(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -427,7 +442,10 @@ async def get_empty_string_key(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -473,7 +491,10 @@ async def get_invalid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -519,7 +540,10 @@ async def get_boolean_tfft(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -611,7 +635,10 @@ async def put_boolean_tfft(self, array_body: Union[dict[str, bool], IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -653,7 +680,10 @@ async def get_boolean_invalid_null(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -699,7 +729,10 @@ async def get_boolean_invalid_string(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -745,7 +778,10 @@ async def get_integer_valid(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -837,7 +873,10 @@ async def put_integer_valid(self, array_body: Union[dict[str, int], IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -879,7 +918,10 @@ async def get_int_invalid_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -925,7 +967,10 @@ async def get_int_invalid_string(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -971,7 +1016,10 @@ async def get_long_valid(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1063,7 +1111,10 @@ async def put_long_valid(self, array_body: Union[dict[str, int], IO[bytes]], **k if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1105,7 +1156,10 @@ async def get_long_invalid_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1151,7 +1205,10 @@ async def get_long_invalid_string(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1197,7 +1254,10 @@ async def get_float_valid(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1289,7 +1349,10 @@ async def put_float_valid(self, array_body: Union[dict[str, float], IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1331,7 +1394,10 @@ async def get_float_invalid_null(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1377,7 +1443,10 @@ async def get_float_invalid_string(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1423,7 +1492,10 @@ async def get_double_valid(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1515,7 +1587,10 @@ async def put_double_valid(self, array_body: Union[dict[str, float], IO[bytes]], if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1557,7 +1632,10 @@ async def get_double_invalid_null(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1603,7 +1681,10 @@ async def get_double_invalid_string(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -1649,7 +1730,10 @@ async def get_string_valid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1741,7 +1825,10 @@ async def put_string_valid(self, array_body: Union[dict[str, str], IO[bytes]], * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1783,7 +1870,10 @@ async def get_string_with_null(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1829,7 +1919,10 @@ async def get_string_with_invalid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1875,7 +1968,10 @@ async def get_date_valid(self, **kwargs: Any) -> dict[str, datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -1967,7 +2063,10 @@ async def put_date_valid(self, array_body: Union[dict[str, datetime.date], IO[by if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2009,7 +2108,10 @@ async def get_date_invalid_null(self, **kwargs: Any) -> dict[str, datetime.date] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -2055,7 +2157,10 @@ async def get_date_invalid_chars(self, **kwargs: Any) -> dict[str, datetime.date if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -2102,7 +2207,10 @@ async def get_date_time_valid(self, **kwargs: Any) -> dict[str, datetime.datetim if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -2199,7 +2307,10 @@ async def put_date_time_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2241,7 +2352,10 @@ async def get_date_time_invalid_null(self, **kwargs: Any) -> dict[str, datetime. if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -2287,7 +2401,10 @@ async def get_date_time_invalid_chars(self, **kwargs: Any) -> dict[str, datetime if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -2334,7 +2451,10 @@ async def get_date_time_rfc1123_valid(self, **kwargs: Any) -> dict[str, datetime if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{rfc-1123}", pipeline_response.http_response) @@ -2431,7 +2551,10 @@ async def put_date_time_rfc1123_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2473,7 +2596,10 @@ async def get_duration_valid(self, **kwargs: Any) -> dict[str, datetime.timedelt if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{duration}", pipeline_response.http_response) @@ -2567,7 +2693,10 @@ async def put_duration_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2610,7 +2739,10 @@ async def get_byte_valid(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bytearray}", pipeline_response.http_response) @@ -2705,7 +2837,10 @@ async def put_byte_valid(self, array_body: Union[dict[str, bytes], IO[bytes]], * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2748,7 +2883,10 @@ async def get_byte_invalid_null(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bytearray}", pipeline_response.http_response) @@ -2795,7 +2933,10 @@ async def get_base64_url(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{base64}", pipeline_response.http_response) @@ -2841,7 +2982,10 @@ async def get_complex_null(self, **kwargs: Any) -> Optional[dict[str, _models.Wi if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -2887,7 +3031,10 @@ async def get_complex_empty(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -2934,7 +3081,10 @@ async def get_complex_item_null(self, **kwargs: Any) -> dict[str, _models.Widget if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -2981,7 +3131,10 @@ async def get_complex_item_empty(self, **kwargs: Any) -> dict[str, _models.Widge if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3028,7 +3181,10 @@ async def get_complex_valid(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3123,7 +3279,10 @@ async def put_complex_valid(self, array_body: Union[dict[str, _models.Widget], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3165,7 +3324,10 @@ async def get_array_null(self, **kwargs: Any) -> Optional[dict[str, list[str]]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -3211,7 +3373,10 @@ async def get_array_empty(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -3257,7 +3422,10 @@ async def get_array_item_null(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -3303,7 +3471,10 @@ async def get_array_item_empty(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -3350,7 +3521,10 @@ async def get_array_valid(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -3445,7 +3619,10 @@ async def put_array_valid(self, array_body: Union[dict[str, list[str]], IO[bytes if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3487,7 +3664,10 @@ async def get_dictionary_null(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -3533,7 +3713,10 @@ async def get_dictionary_empty(self, **kwargs: Any) -> dict[str, dict[str, str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -3580,7 +3763,10 @@ async def get_dictionary_item_null(self, **kwargs: Any) -> dict[str, dict[str, s if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -3627,7 +3813,10 @@ async def get_dictionary_item_empty(self, **kwargs: Any) -> dict[str, dict[str, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -3675,7 +3864,10 @@ async def get_dictionary_valid(self, **kwargs: Any) -> dict[str, dict[str, str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -3775,7 +3967,10 @@ async def put_dictionary_valid( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py index 9bb84fceb45..e17bae63afa 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py @@ -1048,7 +1048,10 @@ def get_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1094,7 +1097,10 @@ def get_empty(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1184,7 +1190,10 @@ def put_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1226,7 +1235,10 @@ def get_null_value(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1272,7 +1284,10 @@ def get_null_key(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1318,7 +1333,10 @@ def get_empty_string_key(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1364,7 +1382,10 @@ def get_invalid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -1410,7 +1431,10 @@ def get_boolean_tfft(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -1502,7 +1526,10 @@ def put_boolean_tfft( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1544,7 +1571,10 @@ def get_boolean_invalid_null(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -1590,7 +1620,10 @@ def get_boolean_invalid_string(self, **kwargs: Any) -> dict[str, bool]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bool}", pipeline_response.http_response) @@ -1636,7 +1669,10 @@ def get_integer_valid(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1730,7 +1766,10 @@ def put_integer_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1772,7 +1811,10 @@ def get_int_invalid_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1818,7 +1860,10 @@ def get_int_invalid_string(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1864,7 +1909,10 @@ def get_long_valid(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -1956,7 +2004,10 @@ def put_long_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1998,7 +2049,10 @@ def get_long_invalid_null(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -2044,7 +2098,10 @@ def get_long_invalid_string(self, **kwargs: Any) -> dict[str, int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -2090,7 +2147,10 @@ def get_float_valid(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2182,7 +2242,10 @@ def put_float_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2224,7 +2287,10 @@ def get_float_invalid_null(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2270,7 +2336,10 @@ def get_float_invalid_string(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2316,7 +2385,10 @@ def get_double_valid(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2408,7 +2480,10 @@ def put_double_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2450,7 +2525,10 @@ def get_double_invalid_null(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2496,7 +2574,10 @@ def get_double_invalid_string(self, **kwargs: Any) -> dict[str, float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{float}", pipeline_response.http_response) @@ -2542,7 +2623,10 @@ def get_string_valid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -2634,7 +2718,10 @@ def put_string_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2676,7 +2763,10 @@ def get_string_with_null(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -2722,7 +2812,10 @@ def get_string_with_invalid(self, **kwargs: Any) -> dict[str, str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{str}", pipeline_response.http_response) @@ -2768,7 +2861,10 @@ def get_date_valid(self, **kwargs: Any) -> dict[str, datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -2860,7 +2956,10 @@ def put_date_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2902,7 +3001,10 @@ def get_date_invalid_null(self, **kwargs: Any) -> dict[str, datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -2948,7 +3050,10 @@ def get_date_invalid_chars(self, **kwargs: Any) -> dict[str, datetime.date]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{date}", pipeline_response.http_response) @@ -2995,7 +3100,10 @@ def get_date_time_valid(self, **kwargs: Any) -> dict[str, datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -3092,7 +3200,10 @@ def put_date_time_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3134,7 +3245,10 @@ def get_date_time_invalid_null(self, **kwargs: Any) -> dict[str, datetime.dateti if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -3180,7 +3294,10 @@ def get_date_time_invalid_chars(self, **kwargs: Any) -> dict[str, datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{iso-8601}", pipeline_response.http_response) @@ -3227,7 +3344,10 @@ def get_date_time_rfc1123_valid(self, **kwargs: Any) -> dict[str, datetime.datet if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{rfc-1123}", pipeline_response.http_response) @@ -3324,7 +3444,10 @@ def put_date_time_rfc1123_valid( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3366,7 +3489,10 @@ def get_duration_valid(self, **kwargs: Any) -> dict[str, datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{duration}", pipeline_response.http_response) @@ -3460,7 +3586,10 @@ def put_duration_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3503,7 +3632,10 @@ def get_byte_valid(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bytearray}", pipeline_response.http_response) @@ -3598,7 +3730,10 @@ def put_byte_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -3641,7 +3776,10 @@ def get_byte_invalid_null(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{bytearray}", pipeline_response.http_response) @@ -3688,7 +3826,10 @@ def get_base64_url(self, **kwargs: Any) -> dict[str, bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{base64}", pipeline_response.http_response) @@ -3734,7 +3875,10 @@ def get_complex_null(self, **kwargs: Any) -> Optional[dict[str, _models.Widget]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3780,7 +3924,10 @@ def get_complex_empty(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3827,7 +3974,10 @@ def get_complex_item_null(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3874,7 +4024,10 @@ def get_complex_item_empty(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -3921,7 +4074,10 @@ def get_complex_valid(self, **kwargs: Any) -> dict[str, _models.Widget]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{Widget}", pipeline_response.http_response) @@ -4018,7 +4174,10 @@ def put_complex_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4060,7 +4219,10 @@ def get_array_null(self, **kwargs: Any) -> Optional[dict[str, list[str]]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -4106,7 +4268,10 @@ def get_array_empty(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -4152,7 +4317,10 @@ def get_array_item_null(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -4198,7 +4366,10 @@ def get_array_item_empty(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -4245,7 +4416,10 @@ def get_array_valid(self, **kwargs: Any) -> dict[str, list[str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{[str]}", pipeline_response.http_response) @@ -4340,7 +4514,10 @@ def put_array_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -4382,7 +4559,10 @@ def get_dictionary_null(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -4428,7 +4608,10 @@ def get_dictionary_empty(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -4475,7 +4658,10 @@ def get_dictionary_item_null(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -4522,7 +4708,10 @@ def get_dictionary_item_empty(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -4570,7 +4759,10 @@ def get_dictionary_valid(self, **kwargs: Any) -> dict[str, dict[str, str]]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{{str}}", pipeline_response.http_response) @@ -4670,7 +4862,10 @@ def put_dictionary_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py index 213662677e4..345f4c6f655 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/aio/operations/_duration_operations.py @@ -94,7 +94,10 @@ async def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -147,7 +150,10 @@ async def put_positive_duration(self, duration_body: datetime.timedelta, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -189,7 +195,10 @@ async def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -235,7 +244,10 @@ async def get_invalid(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py index 0892f8ada13..881b7aba931 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyDuration/bodyduration/operations/_duration_operations.py @@ -150,7 +150,10 @@ def get_null(self, **kwargs: Any) -> Optional[datetime.timedelta]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -205,7 +208,10 @@ def put_positive_duration( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -247,7 +253,10 @@ def get_positive_duration(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) @@ -293,7 +302,10 @@ def get_invalid(self, **kwargs: Any) -> datetime.timedelta: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("duration", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py index c5139277c6c..7fefbd9783b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/aio/operations/_files_operations.py @@ -98,7 +98,10 @@ async def get_file(self, **kwargs: Any) -> AsyncIterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -149,7 +152,10 @@ async def get_file_large(self, **kwargs: Any) -> AsyncIterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -200,7 +206,10 @@ async def get_empty_file(self, **kwargs: Any) -> AsyncIterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py index 7b587540df4..1abc440fd7f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFile/bodyfile/operations/_files_operations.py @@ -139,7 +139,10 @@ def get_file(self, **kwargs: Any) -> Iterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -190,7 +193,10 @@ def get_file_large(self, **kwargs: Any) -> Iterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -241,7 +247,10 @@ def get_empty_file(self, **kwargs: Any) -> Iterator[bytes]: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py index 86acbcc28f4..86927f29154 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/aio/operations/_formdata_operations.py @@ -113,7 +113,10 @@ async def upload_file(self, file_content: IO[bytes], file_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -171,7 +174,10 @@ async def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -232,7 +238,10 @@ async def upload_files(self, file_content: list[IO[bytes]], **kwargs: Any) -> As except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py index 89707828be1..311b4423994 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyFormData/bodyformdata/operations/_formdata_operations.py @@ -158,7 +158,10 @@ def upload_file(self, file_content: IO[bytes], file_name: str, **kwargs: Any) -> except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -216,7 +219,10 @@ def upload_file_via_body(self, file_content: IO[bytes], **kwargs: Any) -> Iterat except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -277,7 +283,10 @@ def upload_files(self, file_content: list[IO[bytes]], **kwargs: Any) -> Iterator except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py index aab9c1bd2f6..e8a372f5722 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/aio/operations/_int_operations_operations.py @@ -104,7 +104,10 @@ async def get_null(self, **kwargs: Any) -> Optional[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -150,7 +153,10 @@ async def get_invalid(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -196,7 +202,10 @@ async def get_overflow_int32(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -242,7 +251,10 @@ async def get_underflow_int32(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -288,7 +300,10 @@ async def get_overflow_int64(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -334,7 +349,10 @@ async def get_underflow_int64(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -387,7 +405,10 @@ async def put_max32(self, int_body: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -436,7 +457,10 @@ async def put_max64(self, int_body: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -485,7 +509,10 @@ async def put_min32(self, int_body: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -534,7 +561,10 @@ async def put_min64(self, int_body: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -576,7 +606,10 @@ async def get_unix_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) @@ -629,7 +662,10 @@ async def put_unix_time_date(self, int_body: datetime.datetime, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -671,7 +707,10 @@ async def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) @@ -717,7 +756,10 @@ async def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py index e9c412f7add..494b3ba83d9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyInteger/bodyinteger/operations/_int_operations_operations.py @@ -302,7 +302,10 @@ def get_null(self, **kwargs: Any) -> Optional[int]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -348,7 +351,10 @@ def get_invalid(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -394,7 +400,10 @@ def get_overflow_int32(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -440,7 +449,10 @@ def get_underflow_int32(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -486,7 +498,10 @@ def get_overflow_int64(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -532,7 +547,10 @@ def get_underflow_int64(self, **kwargs: Any) -> int: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("int", pipeline_response.http_response) @@ -585,7 +603,10 @@ def put_max32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -634,7 +655,10 @@ def put_max64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -683,7 +707,10 @@ def put_min32(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -732,7 +759,10 @@ def put_min64(self, int_body: int, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -774,7 +804,10 @@ def get_unix_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) @@ -829,7 +862,10 @@ def put_unix_time_date( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -871,7 +907,10 @@ def get_invalid_unix_time(self, **kwargs: Any) -> datetime.datetime: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) @@ -917,7 +956,10 @@ def get_null_unix_time(self, **kwargs: Any) -> Optional[datetime.datetime]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("unix-time", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py index 3092f90e382..05f04888d67 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/aio/operations/_number_operations.py @@ -112,7 +112,10 @@ async def get_null(self, **kwargs: Any) -> Optional[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -158,7 +161,10 @@ async def get_invalid_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -204,7 +210,10 @@ async def get_invalid_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -250,7 +259,10 @@ async def get_invalid_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -303,7 +315,10 @@ async def put_big_float(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -345,7 +360,10 @@ async def get_big_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -398,7 +416,10 @@ async def put_big_double(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -440,7 +461,10 @@ async def get_big_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -492,7 +516,10 @@ async def put_big_double_positive_decimal(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -534,7 +561,10 @@ async def get_big_double_positive_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -586,7 +616,10 @@ async def put_big_double_negative_decimal(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -628,7 +661,10 @@ async def get_big_double_negative_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -681,7 +717,10 @@ async def put_big_decimal(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -723,7 +762,10 @@ async def get_big_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -775,7 +817,10 @@ async def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -817,7 +862,10 @@ async def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -869,7 +917,10 @@ async def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -911,7 +962,10 @@ async def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -964,7 +1018,10 @@ async def put_small_float(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1006,7 +1063,10 @@ async def get_small_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1059,7 +1119,10 @@ async def put_small_double(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1101,7 +1164,10 @@ async def get_small_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1154,7 +1220,10 @@ async def put_small_decimal(self, number_body: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1196,7 +1265,10 @@ async def get_small_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py index a952752acd6..87e038df08e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyNumber/bodynumber/operations/_number_operations.py @@ -459,7 +459,10 @@ def get_null(self, **kwargs: Any) -> Optional[float]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -505,7 +508,10 @@ def get_invalid_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -551,7 +557,10 @@ def get_invalid_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -597,7 +606,10 @@ def get_invalid_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -652,7 +664,10 @@ def put_big_float( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -694,7 +709,10 @@ def get_big_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -749,7 +767,10 @@ def put_big_double( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -791,7 +812,10 @@ def get_big_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -843,7 +867,10 @@ def put_big_double_positive_decimal(self, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -885,7 +912,10 @@ def get_big_double_positive_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -937,7 +967,10 @@ def put_big_double_negative_decimal(self, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -979,7 +1012,10 @@ def get_big_double_negative_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1034,7 +1070,10 @@ def put_big_decimal( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1076,7 +1115,10 @@ def get_big_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1128,7 +1170,10 @@ def put_big_decimal_positive_decimal(self, **kwargs: Any) -> None: # pylint: di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1170,7 +1215,10 @@ def get_big_decimal_positive_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1222,7 +1270,10 @@ def put_big_decimal_negative_decimal(self, **kwargs: Any) -> None: # pylint: di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1264,7 +1315,10 @@ def get_big_decimal_negative_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1319,7 +1373,10 @@ def put_small_float( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1361,7 +1418,10 @@ def get_small_float(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1416,7 +1476,10 @@ def put_small_double( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1458,7 +1521,10 @@ def get_small_double(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) @@ -1513,7 +1579,10 @@ def put_small_decimal( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1555,7 +1624,10 @@ def get_small_decimal(self, **kwargs: Any) -> float: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("float", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py index c88e7db6dfe..cfb21d2cf96 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_enum_operations.py @@ -93,7 +93,10 @@ async def get_not_expandable(self, **kwargs: Any) -> Union[str, _models.Colors]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -147,7 +150,10 @@ async def put_not_expandable(self, string_body: Union[str, _models.Colors], **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -189,7 +195,10 @@ async def get_referenced(self, **kwargs: Any) -> Union[str, _models.Colors]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -243,7 +252,10 @@ async def put_referenced(self, enum_string_body: Union[str, _models.Colors], **k if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -285,7 +297,10 @@ async def get_referenced_constant(self, **kwargs: Any) -> _models.RefColorConsta if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("RefColorConstant", pipeline_response.http_response) @@ -340,7 +355,10 @@ async def put_referenced_constant(self, field1: Optional[str] = None, **kwargs: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py index 73e1be1a438..6a554b95c9d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/aio/operations/_string_operations.py @@ -100,7 +100,10 @@ async def get_null(self, **kwargs: Any) -> Optional[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -157,7 +160,10 @@ async def put_null(self, string_body: Optional[str] = None, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -199,7 +205,10 @@ async def get_empty(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -251,7 +260,10 @@ async def put_empty(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -293,7 +305,10 @@ async def get_mbcs(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -350,7 +365,10 @@ async def put_mbcs(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -394,7 +412,10 @@ async def get_whitespace(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -450,7 +471,10 @@ async def put_whitespace(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -492,7 +516,10 @@ async def get_not_provided(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -538,7 +565,10 @@ async def get_base64_encoded(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -584,7 +614,10 @@ async def get_base64_url_encoded(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("base64", pipeline_response.http_response) @@ -637,7 +670,10 @@ async def put_base64_url_encoded(self, string_body: bytes, **kwargs: Any) -> Non if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -679,7 +715,10 @@ async def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("base64", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py index a54fb364c6e..e3ae9b45df6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_enum_operations.py @@ -181,7 +181,10 @@ def get_not_expandable(self, **kwargs: Any) -> Union[str, _models.Colors]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -237,7 +240,10 @@ def put_not_expandable( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -279,7 +285,10 @@ def get_referenced(self, **kwargs: Any) -> Union[str, _models.Colors]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -335,7 +344,10 @@ def put_referenced( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -377,7 +389,10 @@ def get_referenced_constant(self, **kwargs: Any) -> _models.RefColorConstant: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("RefColorConstant", pipeline_response.http_response) @@ -434,7 +449,10 @@ def put_referenced_constant( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py index 2b9f0df0539..e912c5d521c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyString/bodystring/operations/_string_operations.py @@ -295,7 +295,10 @@ def get_null(self, **kwargs: Any) -> Optional[str]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -354,7 +357,10 @@ def put_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -396,7 +402,10 @@ def get_empty(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -448,7 +457,10 @@ def put_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retu if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -490,7 +502,10 @@ def get_mbcs(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -547,7 +562,10 @@ def put_mbcs(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-retur if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -591,7 +609,10 @@ def get_whitespace(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -647,7 +668,10 @@ def put_whitespace(self, **kwargs: Any) -> None: # pylint: disable=inconsistent if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -689,7 +713,10 @@ def get_not_provided(self, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) @@ -735,7 +762,10 @@ def get_base64_encoded(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bytearray", pipeline_response.http_response) @@ -781,7 +811,10 @@ def get_base64_url_encoded(self, **kwargs: Any) -> bytes: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("base64", pipeline_response.http_response) @@ -836,7 +869,10 @@ def put_base64_url_encoded( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -878,7 +914,10 @@ def get_null_base64_url_encoded(self, **kwargs: Any) -> Optional[bytes]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("base64", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py index f49dace7c9e..cc29154fd95 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/aio/operations/_time_operations.py @@ -87,7 +87,10 @@ async def get(self, **kwargs: Any) -> datetime.time: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("time", pipeline_response.http_response) @@ -140,7 +143,10 @@ async def put(self, time_body: datetime.time, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py index f906da74705..b7159071df5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/BodyTime/bodytime/operations/_time_operations.py @@ -120,7 +120,10 @@ def get(self, **kwargs: Any) -> datetime.time: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("time", pipeline_response.http_response) @@ -173,7 +176,10 @@ def put(self, time_body: datetime.time, **kwargs: Any) -> str: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("str", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py index 2911e0b68b4..3e6aafb0d8f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/aio/operations/_paths_operations.py @@ -94,7 +94,10 @@ async def get_empty(self, account_name: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py index 1718f870158..ae66e30f4a3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUri/custombaseurl/operations/_paths_operations.py @@ -110,7 +110,10 @@ def get_empty(self, account_name: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py index c949283662b..d850d17bcf3 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/aio/operations/_paths_operations.py @@ -105,7 +105,10 @@ async def get_empty(self, vault: str, secret: str, key_name: str, key_version: s if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py index 90050f9393b..f2ab03533ca 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/CustomBaseUriMoreOptions/custombaseurlmoreoptions/operations/_paths_operations.py @@ -137,7 +137,10 @@ def get_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py index b62892e589a..9c9116bb065 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/aio/operations/_error_with_secrets_operations.py @@ -74,7 +74,10 @@ async def create_secret(self, **kwargs: Any) -> _models.SecretResponse: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SecretResponse", pipeline_response.http_response) @@ -120,7 +123,10 @@ async def get_error_with_secrets(self, **kwargs: Any) -> None: if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py index 5d8b0fa1931..7be7abc6d4f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ErrorWithSecrets/errorwithsecrets/operations/_error_with_secrets_operations.py @@ -102,7 +102,10 @@ def create_secret(self, **kwargs: Any) -> _models.SecretResponse: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SecretResponse", pipeline_response.http_response) @@ -148,7 +151,10 @@ def get_error_with_secrets(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.ErrorResponse, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py index b2b8d89ad94..845152e8d92 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/aio/operations/_header_operations.py @@ -123,7 +123,10 @@ async def param_existing_key(self, user_agent_parameter: str, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -165,7 +168,10 @@ async def response_existing_key(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -212,7 +218,10 @@ async def param_protected_key(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -254,7 +263,10 @@ async def response_protected_key(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -307,7 +319,10 @@ async def param_integer(self, scenario: str, value: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -353,7 +368,10 @@ async def response_integer(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -406,7 +424,10 @@ async def param_long(self, scenario: str, value: int, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -452,7 +473,10 @@ async def response_long(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -505,7 +529,10 @@ async def param_float(self, scenario: str, value: float, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -551,7 +578,10 @@ async def response_float(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -604,7 +634,10 @@ async def param_double(self, scenario: str, value: float, **kwargs: Any) -> None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -650,7 +683,10 @@ async def response_double(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -703,7 +739,10 @@ async def param_bool(self, scenario: str, value: bool, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -749,7 +788,10 @@ async def response_bool(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -803,7 +845,10 @@ async def param_string(self, scenario: str, value: Optional[str] = None, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -849,7 +894,10 @@ async def response_string(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -901,7 +949,10 @@ async def param_date(self, scenario: str, value: datetime.date, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -946,7 +997,10 @@ async def response_date(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -999,7 +1053,10 @@ async def param_datetime(self, scenario: str, value: datetime.datetime, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1044,7 +1101,10 @@ async def response_datetime(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1099,7 +1159,10 @@ async def param_datetime_rfc1123( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1145,7 +1208,10 @@ async def response_datetime_rfc1123(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1196,7 +1262,10 @@ async def param_duration(self, scenario: str, value: datetime.timedelta, **kwarg if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1241,7 +1310,10 @@ async def response_duration(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1292,7 +1364,10 @@ async def param_byte(self, scenario: str, value: bytes, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1337,7 +1412,10 @@ async def response_byte(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1393,7 +1471,10 @@ async def param_enum( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1439,7 +1520,10 @@ async def response_enum(self, scenario: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1485,7 +1569,10 @@ async def custom_request_id(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py index 6fcf29fb467..fbe3fa4e465 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Header/header/operations/_header_operations.py @@ -550,7 +550,10 @@ def param_existing_key( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -592,7 +595,10 @@ def response_existing_key(self, **kwargs: Any) -> None: # pylint: disable=incon if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -639,7 +645,10 @@ def param_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inconsi if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -681,7 +690,10 @@ def response_protected_key(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -736,7 +748,10 @@ def param_integer( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -782,7 +797,10 @@ def response_integer(self, scenario: str, **kwargs: Any) -> None: # pylint: dis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -837,7 +855,10 @@ def param_long( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -883,7 +904,10 @@ def response_long(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -938,7 +962,10 @@ def param_float( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -984,7 +1011,10 @@ def response_float(self, scenario: str, **kwargs: Any) -> None: # pylint: disab if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1039,7 +1069,10 @@ def param_double( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1085,7 +1118,10 @@ def response_double(self, scenario: str, **kwargs: Any) -> None: # pylint: disa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1140,7 +1176,10 @@ def param_bool( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1186,7 +1225,10 @@ def response_bool(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1242,7 +1284,10 @@ def param_string( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1288,7 +1333,10 @@ def response_string(self, scenario: str, **kwargs: Any) -> None: # pylint: disa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1342,7 +1390,10 @@ def param_date( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1387,7 +1438,10 @@ def response_date(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1442,7 +1496,10 @@ def param_datetime( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1487,7 +1544,10 @@ def response_datetime(self, scenario: str, **kwargs: Any) -> None: # pylint: di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1542,7 +1602,10 @@ def param_datetime_rfc1123( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1590,7 +1653,10 @@ def response_datetime_rfc1123( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1643,7 +1709,10 @@ def param_duration( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1688,7 +1757,10 @@ def response_duration(self, scenario: str, **kwargs: Any) -> None: # pylint: di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1741,7 +1813,10 @@ def param_byte( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1786,7 +1861,10 @@ def response_byte(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1842,7 +1920,10 @@ def param_enum( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1888,7 +1969,10 @@ def response_enum(self, scenario: str, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1934,7 +2018,10 @@ def custom_request_id(self, **kwargs: Any) -> None: # pylint: disable=inconsist if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py index 57ac51b8fd4..38ef388f633 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_client_failure_operations.py @@ -116,7 +116,10 @@ async def head400(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -158,7 +161,10 @@ async def get400(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -200,7 +206,10 @@ async def options400(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -254,7 +263,10 @@ async def put400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -308,7 +320,10 @@ async def patch400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -362,7 +377,10 @@ async def post400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -416,7 +434,10 @@ async def delete400(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -458,7 +479,10 @@ async def head401(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -500,7 +524,10 @@ async def get402(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -542,7 +569,10 @@ async def options403(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -584,7 +614,10 @@ async def get403(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -638,7 +671,10 @@ async def put404(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -692,7 +728,10 @@ async def patch405(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -746,7 +785,10 @@ async def post406(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -800,7 +842,10 @@ async def delete407(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -854,7 +899,10 @@ async def put409(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -896,7 +944,10 @@ async def head410(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -938,7 +989,10 @@ async def get411(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -980,7 +1034,10 @@ async def options412(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1022,7 +1079,10 @@ async def get412(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1076,7 +1136,10 @@ async def put413(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1130,7 +1193,10 @@ async def patch414(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1184,7 +1250,10 @@ async def post415(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1226,7 +1295,10 @@ async def get416(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1280,7 +1352,10 @@ async def delete417(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1322,7 +1397,10 @@ async def head429(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py index bd1ea47654f..5e01254a169 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_failure_operations.py @@ -91,7 +91,10 @@ async def get_empty_error(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py index 00498a5a9fd..4c1a32c820b 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_redirects_operations.py @@ -105,7 +105,10 @@ async def head300(self, **kwargs: Any) -> None: if response.status_code not in [200, 300]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -151,7 +154,10 @@ async def get300(self, **kwargs: Any) -> Optional[list[str]]: if response.status_code not in [200, 300]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -202,7 +208,10 @@ async def head301(self, **kwargs: Any) -> None: if response.status_code not in [200, 301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -248,7 +257,10 @@ async def get301(self, **kwargs: Any) -> None: if response.status_code not in [200, 301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -307,7 +319,10 @@ async def put301(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -352,7 +367,10 @@ async def head302(self, **kwargs: Any) -> None: if response.status_code not in [200, 302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -398,7 +416,10 @@ async def get302(self, **kwargs: Any) -> None: if response.status_code not in [200, 302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -457,7 +478,10 @@ async def patch302(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -515,7 +539,10 @@ async def post303(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [200, 303]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -561,7 +588,10 @@ async def head307(self, **kwargs: Any) -> None: if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -607,7 +637,10 @@ async def get307(self, **kwargs: Any) -> None: if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -653,7 +686,10 @@ async def options307(self, **kwargs: Any) -> None: if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -711,7 +747,10 @@ async def put307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -769,7 +808,10 @@ async def patch307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -827,7 +869,10 @@ async def post307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -885,7 +930,10 @@ async def delete307(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py index 611f74d2014..44fac38cade 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_retry_operations.py @@ -98,7 +98,10 @@ async def head408(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -152,7 +155,10 @@ async def put500(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -206,7 +212,10 @@ async def patch500(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -248,7 +257,10 @@ async def get502(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -290,7 +302,10 @@ async def options502(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -348,7 +363,10 @@ async def post503(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -402,7 +420,10 @@ async def delete503(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -456,7 +477,10 @@ async def put504(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -510,7 +534,10 @@ async def patch504(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py index 10d02d79a17..ba4f9cfbd8e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_server_failure_operations.py @@ -93,7 +93,10 @@ async def head501(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -135,7 +138,10 @@ async def get501(self, **kwargs: Any) -> None: if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -189,7 +195,10 @@ async def post505(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -243,7 +252,10 @@ async def delete505(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py index f06fa0b8677..6b5dd85c5b0 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_http_success_operations.py @@ -109,7 +109,10 @@ async def head200(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -151,7 +154,10 @@ async def get200(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -197,7 +203,10 @@ async def options200(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -255,7 +264,10 @@ async def put200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -309,7 +321,10 @@ async def patch200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -363,7 +378,10 @@ async def post200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -417,7 +435,10 @@ async def delete200(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -471,7 +492,10 @@ async def put201(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -525,7 +549,10 @@ async def post201(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -579,7 +606,10 @@ async def put202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -633,7 +663,10 @@ async def patch202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -687,7 +720,10 @@ async def post202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -741,7 +777,10 @@ async def delete202(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -783,7 +822,10 @@ async def head204(self, **kwargs: Any) -> None: if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -837,7 +879,10 @@ async def put204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> No if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -891,7 +936,10 @@ async def patch204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -945,7 +993,10 @@ async def post204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> N if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -999,7 +1050,10 @@ async def delete204(self, boolean_value: Literal[True] = True, **kwargs: Any) -> if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1041,7 +1095,10 @@ async def head404(self, **kwargs: Any) -> None: if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py index 27f5868d666..5d06e01f8c6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/aio/operations/_multiple_responses_operations.py @@ -125,7 +125,10 @@ async def get200_model204_no_model_default_error200_valid( # pylint: disable=na if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -175,7 +178,10 @@ async def get200_model204_no_model_default_error204_valid( # pylint: disable=na if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -225,7 +231,10 @@ async def get200_model204_no_model_default_error201_invalid( # pylint: disable= if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -275,7 +284,10 @@ async def get200_model204_no_model_default_error202_none( # pylint: disable=nam if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -325,7 +337,10 @@ async def get200_model204_no_model_default_error400_valid( # pylint: disable=na if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -375,7 +390,10 @@ async def get200_model201_model_default_error200_valid( # pylint: disable=name- if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -427,7 +445,10 @@ async def get200_model201_model_default_error201_valid( # pylint: disable=name- if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -479,7 +500,10 @@ async def get200_model201_model_default_error400_valid( # pylint: disable=name- if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -532,7 +556,10 @@ async def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -588,7 +615,10 @@ async def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -644,7 +674,10 @@ async def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -700,7 +733,10 @@ async def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -753,7 +789,10 @@ async def get202_none204_none_default_error202_none(self, **kwargs: Any) -> None if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -795,7 +834,10 @@ async def get202_none204_none_default_error204_none(self, **kwargs: Any) -> None if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -837,7 +879,10 @@ async def get202_none204_none_default_error400_valid(self, **kwargs: Any) -> Non if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1133,7 +1178,10 @@ async def get_default_model_a400_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MyException, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.MyException, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1175,7 +1223,10 @@ async def get_default_model_a400_none(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MyException, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.MyException, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py index 6b0d2b8e772..52f0003ba7f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_client_failure_operations.py @@ -494,7 +494,10 @@ def head400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -536,7 +539,10 @@ def get400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -578,7 +584,10 @@ def options400(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -634,7 +643,10 @@ def put400( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -690,7 +702,10 @@ def patch400( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -746,7 +761,10 @@ def post400( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -802,7 +820,10 @@ def delete400( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -844,7 +865,10 @@ def head401(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -886,7 +910,10 @@ def get402(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -928,7 +955,10 @@ def options403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -970,7 +1000,10 @@ def get403(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1026,7 +1059,10 @@ def put404( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1082,7 +1118,10 @@ def patch405( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1138,7 +1177,10 @@ def post406( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1194,7 +1236,10 @@ def delete407( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1250,7 +1295,10 @@ def put409( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1292,7 +1340,10 @@ def head410(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1334,7 +1385,10 @@ def get411(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1376,7 +1430,10 @@ def options412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1418,7 +1475,10 @@ def get412(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1474,7 +1534,10 @@ def put413( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1530,7 +1593,10 @@ def patch414( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1586,7 +1652,10 @@ def post415( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1628,7 +1697,10 @@ def get416(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1684,7 +1756,10 @@ def delete417( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1726,7 +1801,10 @@ def head429(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py index 49ead8b13c2..9a657ffa873 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_failure_operations.py @@ -132,7 +132,10 @@ def get_empty_error(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py index fee0307bbf7..09bae09b9c2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_redirects_operations.py @@ -336,7 +336,10 @@ def head300(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200, 300]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -382,7 +385,10 @@ def get300(self, **kwargs: Any) -> Optional[list[str]]: if response.status_code not in [200, 300]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -433,7 +439,10 @@ def head301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200, 301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -479,7 +488,10 @@ def get301(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in [200, 301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -540,7 +552,10 @@ def put301( # pylint: disable=inconsistent-return-statements if response.status_code not in [301]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -585,7 +600,10 @@ def head302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200, 302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -631,7 +649,10 @@ def get302(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in [200, 302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -692,7 +713,10 @@ def patch302( # pylint: disable=inconsistent-return-statements if response.status_code not in [302]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -752,7 +776,10 @@ def post303( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 303]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -798,7 +825,10 @@ def head307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -844,7 +874,10 @@ def get307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -890,7 +923,10 @@ def options307(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -950,7 +986,10 @@ def put307( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1010,7 +1049,10 @@ def patch307( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1070,7 +1112,10 @@ def post307( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -1130,7 +1175,10 @@ def delete307( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) response_headers = {} diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py index 3976d3d1a56..6576d435d98 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_retry_operations.py @@ -234,7 +234,10 @@ def head408(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -290,7 +293,10 @@ def put500( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -346,7 +352,10 @@ def patch500( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -388,7 +397,10 @@ def get502(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -430,7 +442,10 @@ def options502(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -490,7 +505,10 @@ def post503( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -546,7 +564,10 @@ def delete503( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -602,7 +623,10 @@ def put504( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -658,7 +682,10 @@ def patch504( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py index d67ff5dbe37..fa686493b8e 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_server_failure_operations.py @@ -152,7 +152,10 @@ def head501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -194,7 +197,10 @@ def get501(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return- if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -250,7 +256,10 @@ def post505( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -306,7 +315,10 @@ def delete505( # pylint: disable=inconsistent-return-statements if response.status_code not in []: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py index d5f101da8d7..ca46d4c8fdb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_http_success_operations.py @@ -399,7 +399,10 @@ def head200(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -441,7 +444,10 @@ def get200(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -487,7 +493,10 @@ def options200(self, **kwargs: Any) -> bool: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("bool", pipeline_response.http_response) @@ -547,7 +556,10 @@ def put200( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -603,7 +615,10 @@ def patch200( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -659,7 +674,10 @@ def post200( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -715,7 +733,10 @@ def delete200( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -771,7 +792,10 @@ def put201( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -827,7 +851,10 @@ def post201( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -883,7 +910,10 @@ def put202( # pylint: disable=inconsistent-return-statements if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -939,7 +969,10 @@ def patch202( # pylint: disable=inconsistent-return-statements if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -995,7 +1028,10 @@ def post202( # pylint: disable=inconsistent-return-statements if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1051,7 +1087,10 @@ def delete202( # pylint: disable=inconsistent-return-statements if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1093,7 +1132,10 @@ def head204(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1149,7 +1191,10 @@ def put204( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1205,7 +1250,10 @@ def patch204( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1261,7 +1309,10 @@ def post204( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1317,7 +1368,10 @@ def delete204( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1359,7 +1413,10 @@ def head404(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py index 3278ffb66a7..b9e73578a09 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Http/httpinfrastructure/operations/_multiple_responses_operations.py @@ -551,7 +551,10 @@ def get200_model204_no_model_default_error200_valid( # pylint: disable=name-too if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -601,7 +604,10 @@ def get200_model204_no_model_default_error204_valid( # pylint: disable=name-too if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -651,7 +657,10 @@ def get200_model204_no_model_default_error201_invalid( # pylint: disable=name-t if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -701,7 +710,10 @@ def get200_model204_no_model_default_error202_none( # pylint: disable=name-too- if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -751,7 +763,10 @@ def get200_model204_no_model_default_error400_valid( # pylint: disable=name-too if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = None @@ -801,7 +816,10 @@ def get200_model201_model_default_error200_valid( # pylint: disable=name-too-lo if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -853,7 +871,10 @@ def get200_model201_model_default_error201_valid( # pylint: disable=name-too-lo if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -905,7 +926,10 @@ def get200_model201_model_default_error400_valid( # pylint: disable=name-too-lo if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -958,7 +982,10 @@ def get200_model_a201_model_c404_model_d_default_error200_valid( # pylint: disa if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -1014,7 +1041,10 @@ def get200_model_a201_model_c404_model_d_default_error201_valid( # pylint: disa if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -1070,7 +1100,10 @@ def get200_model_a201_model_c404_model_d_default_error404_valid( # pylint: disa if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -1126,7 +1159,10 @@ def get200_model_a201_model_c404_model_d_default_error400_valid( # pylint: disa if response.status_code not in [200, 201, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -1181,7 +1217,10 @@ def get202_none204_none_default_error202_none( # pylint: disable=inconsistent-r if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1225,7 +1264,10 @@ def get202_none204_none_default_error204_none( # pylint: disable=inconsistent-r if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1269,7 +1311,10 @@ def get202_none204_none_default_error400_valid( # pylint: disable=inconsistent- if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1573,7 +1618,10 @@ def get_default_model_a400_valid(self, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MyException, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.MyException, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1615,7 +1663,10 @@ def get_default_model_a400_none(self, **kwargs: Any) -> None: # pylint: disable if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.MyException, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.MyException, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py index b21e7bf9598..9bf5cc8b2be 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/aio/operations/_merge_patch_json_client_operations.py @@ -79,7 +79,10 @@ async def patch_single(self, body: JSON, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py index ad82e01f033..aaac24139a8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MergePatchJson/mergepatchjson/operations/_merge_patch_json_client_operations.py @@ -98,7 +98,10 @@ def patch_single(self, body: JSON, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py index 77d306bbe82..feccdea2dea 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations/_auto_rest_resource_flattening_test_service_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=line-too-long,useless-suppression +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -153,7 +153,10 @@ async def put_array( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -198,7 +201,10 @@ async def get_array(self, **kwargs: Any) -> list[_models.FlattenedProduct]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[FlattenedProduct]", pipeline_response.http_response) @@ -313,7 +319,10 @@ async def put_wrapped_array( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -359,7 +368,10 @@ async def get_wrapped_array(self, **kwargs: Any) -> list[_models.ProductWrapper] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[ProductWrapper]", pipeline_response.http_response) @@ -471,7 +483,10 @@ async def put_dictionary( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -516,7 +531,10 @@ async def get_dictionary(self, **kwargs: Any) -> dict[str, _models.FlattenedProd if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{FlattenedProduct}", pipeline_response.http_response) @@ -634,7 +652,10 @@ async def put_resource_collection( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -679,7 +700,10 @@ async def get_resource_collection(self, **kwargs: Any) -> _models.ResourceCollec if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) @@ -791,7 +815,10 @@ async def put_simple_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) @@ -880,7 +907,10 @@ async def post_flattened_simple_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) @@ -967,7 +997,10 @@ async def put_simple_product_with_grouping( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py index 8ac138cc5d0..b294c4efda9 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ModelFlattening/modelflattening/operations/_auto_rest_resource_flattening_test_service_operations.py @@ -324,7 +324,10 @@ def put_array( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -369,7 +372,10 @@ def get_array(self, **kwargs: Any) -> list[_models.FlattenedProduct]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[FlattenedProduct]", pipeline_response.http_response) @@ -484,7 +490,10 @@ def put_wrapped_array( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -530,7 +539,10 @@ def get_wrapped_array(self, **kwargs: Any) -> list[_models.ProductWrapper]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("[ProductWrapper]", pipeline_response.http_response) @@ -642,7 +654,10 @@ def put_dictionary( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -687,7 +702,10 @@ def get_dictionary(self, **kwargs: Any) -> dict[str, _models.FlattenedProduct]: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{FlattenedProduct}", pipeline_response.http_response) @@ -805,7 +823,10 @@ def put_resource_collection( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -850,7 +871,10 @@ def get_resource_collection(self, **kwargs: Any) -> _models.ResourceCollection: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ResourceCollection", pipeline_response.http_response) @@ -962,7 +986,10 @@ def put_simple_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) @@ -1051,7 +1078,10 @@ def post_flattened_simple_product( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) @@ -1138,7 +1168,10 @@ def put_simple_product_with_grouping( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("SimpleProduct", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py index c8609377b5a..3b7598f578d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/aio/operations/_multiple_inheritance_service_client_operations.py @@ -84,7 +84,10 @@ async def get_horse(self, **kwargs: Any) -> _models.Horse: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Horse", pipeline_response.http_response) @@ -218,7 +221,10 @@ async def get_pet(self, **kwargs: Any) -> _models.Pet: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Pet", pipeline_response.http_response) @@ -317,7 +323,10 @@ async def get_feline(self, **kwargs: Any) -> _models.Feline: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Feline", pipeline_response.http_response) @@ -451,7 +460,10 @@ async def get_cat(self, **kwargs: Any) -> _models.Cat: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Cat", pipeline_response.http_response) @@ -588,7 +600,10 @@ async def get_kitten(self, **kwargs: Any) -> _models.Kitten: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Kitten", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py index 6a8d66d9e57..ead4367b798 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/MultipleInheritance/multipleinheritance/operations/_multiple_inheritance_service_client_operations.py @@ -230,7 +230,10 @@ def get_horse(self, **kwargs: Any) -> _models.Horse: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Horse", pipeline_response.http_response) @@ -364,7 +367,10 @@ def get_pet(self, **kwargs: Any) -> _models.Pet: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Pet", pipeline_response.http_response) @@ -463,7 +469,10 @@ def get_feline(self, **kwargs: Any) -> _models.Feline: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Feline", pipeline_response.http_response) @@ -597,7 +606,10 @@ def get_cat(self, **kwargs: Any) -> _models.Cat: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Cat", pipeline_response.http_response) @@ -734,7 +746,10 @@ def get_kitten(self, **kwargs: Any) -> _models.Kitten: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Kitten", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py index ef55b89af17..99d3b40b411 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/aio/operations/_object_type_client_operations.py @@ -73,7 +73,10 @@ async def get(self, **kwargs: Any) -> JSON: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("object", pipeline_response.http_response) @@ -128,7 +131,10 @@ async def put(self, put_object: JSON, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py index 8859422e34e..3790a4280e1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/ObjectType/objecttype/operations/_object_type_client_operations.py @@ -106,7 +106,10 @@ def get(self, **kwargs: Any) -> JSON: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("object", pipeline_response.http_response) @@ -161,7 +164,10 @@ def put(self, put_object: JSON, **kwargs: Any) -> None: # pylint: disable=incon if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize("object", pipeline_response) + error = self._deserialize.failsafe_deserialize( + "object", + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py index b2ee9e25482..2d71933b8a2 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/aio/operations/_auto_rest_report_service_operations.py @@ -79,7 +79,10 @@ async def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> di if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -130,7 +133,10 @@ async def get_optional_report(self, qualifier: Optional[str] = None, **kwargs: A if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py index 95590688ad7..02107001bbe 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Report/report/operations/_auto_rest_report_service_operations.py @@ -117,7 +117,10 @@ def get_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> dict[str if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) @@ -168,7 +171,10 @@ def get_optional_report(self, qualifier: Optional[str] = None, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("{int}", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py index d5bcea87fa9..7ce1d505f59 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_explicit_operations.py @@ -126,7 +126,10 @@ async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -175,7 +178,10 @@ async def put_required_binary_body(self, body_parameter: IO[bytes], **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -225,7 +231,10 @@ async def post_required_integer_parameter(self, body_parameter: int, **kwargs: A if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -278,7 +287,10 @@ async def post_optional_integer_parameter(self, body_parameter: Optional[int] = if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -329,7 +341,10 @@ async def post_required_integer_property(self, value: int, **kwargs: Any) -> Non if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -382,7 +397,10 @@ async def post_optional_integer_property(self, value: Optional[int] = None, **kw if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -428,7 +446,10 @@ async def post_required_integer_header(self, header_parameter: int, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -473,7 +494,10 @@ async def post_optional_integer_header(self, header_parameter: Optional[int] = N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -523,7 +547,10 @@ async def post_required_string_parameter(self, body_parameter: str, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -576,7 +603,10 @@ async def post_optional_string_parameter(self, body_parameter: Optional[str] = N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -627,7 +657,10 @@ async def post_required_string_property(self, value: str, **kwargs: Any) -> None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -680,7 +713,10 @@ async def post_optional_string_property(self, value: Optional[str] = None, **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -726,7 +762,10 @@ async def post_required_string_header(self, header_parameter: str, **kwargs: Any if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -771,7 +810,10 @@ async def post_optional_string_header(self, body_parameter: Optional[str] = None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -864,7 +906,10 @@ async def post_required_class_parameter( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -958,7 +1003,10 @@ async def post_optional_class_parameter( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1009,7 +1057,10 @@ async def post_required_class_property(self, value: _models.Product, **kwargs: A if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1062,7 +1113,10 @@ async def post_optional_class_property(self, value: Optional[_models.Product] = if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1153,7 +1207,10 @@ async def post_required_array_parameter(self, body_parameter: Union[list[str], I if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1247,7 +1304,10 @@ async def post_optional_array_parameter( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1298,7 +1358,10 @@ async def post_required_array_property(self, value: list[str], **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1351,7 +1414,10 @@ async def post_optional_array_property(self, value: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1397,7 +1463,10 @@ async def post_required_array_header(self, header_parameter: list[str], **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1442,7 +1511,10 @@ async def post_optional_array_header(self, header_parameter: Optional[list[str]] if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py index fae16812009..459f0861c5f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/aio/operations/_implicit_operations.py @@ -101,7 +101,10 @@ async def get_required_path(self, path_parameter: str, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -146,7 +149,10 @@ async def put_optional_query(self, query_parameter: Optional[str] = None, **kwar if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -191,7 +197,10 @@ async def put_optional_header(self, query_parameter: Optional[str] = None, **kwa if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -244,7 +253,10 @@ async def put_optional_body(self, body_parameter: Optional[str] = None, **kwargs if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -296,7 +308,10 @@ async def put_optional_binary_body(self, body_parameter: Optional[IO[bytes]] = N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -339,7 +354,10 @@ async def get_required_global_path(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -382,7 +400,10 @@ async def get_required_global_query(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -425,7 +446,10 @@ async def get_optional_global_query(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py index 009d2ebe7ec..34c91265fa8 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_explicit_operations.py @@ -521,7 +521,10 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -572,7 +575,10 @@ def put_required_binary_body( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -624,7 +630,10 @@ def post_required_integer_parameter( # pylint: disable=inconsistent-return-stat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -679,7 +688,10 @@ def post_optional_integer_parameter( # pylint: disable=inconsistent-return-stat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -732,7 +744,10 @@ def post_required_integer_property( # pylint: disable=inconsistent-return-state if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -787,7 +802,10 @@ def post_optional_integer_property( # pylint: disable=inconsistent-return-state if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -835,7 +853,10 @@ def post_required_integer_header( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -882,7 +903,10 @@ def post_optional_integer_header( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -934,7 +958,10 @@ def post_required_string_parameter( # pylint: disable=inconsistent-return-state if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -989,7 +1016,10 @@ def post_optional_string_parameter( # pylint: disable=inconsistent-return-state if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1042,7 +1072,10 @@ def post_required_string_property( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1097,7 +1130,10 @@ def post_optional_string_property( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1145,7 +1181,10 @@ def post_required_string_header( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1192,7 +1231,10 @@ def post_optional_string_header( # pylint: disable=inconsistent-return-statemen if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1285,7 +1327,10 @@ def post_required_class_parameter( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1379,7 +1424,10 @@ def post_optional_class_parameter( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1432,7 +1480,10 @@ def post_required_class_property( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1487,7 +1538,10 @@ def post_optional_class_property( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1580,7 +1634,10 @@ def post_required_array_parameter( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1674,7 +1731,10 @@ def post_optional_array_parameter( # pylint: disable=inconsistent-return-statem if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1727,7 +1787,10 @@ def post_required_array_property( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1782,7 +1845,10 @@ def post_optional_array_property( # pylint: disable=inconsistent-return-stateme if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1830,7 +1896,10 @@ def post_required_array_header( # pylint: disable=inconsistent-return-statement if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1877,7 +1946,10 @@ def post_optional_array_header( # pylint: disable=inconsistent-return-statement if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py index 793199f02b3..a2f34914bb5 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/RequiredOptional/requiredoptional/operations/_implicit_operations.py @@ -241,7 +241,10 @@ def get_required_path( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -288,7 +291,10 @@ def put_optional_query( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -335,7 +341,10 @@ def put_optional_header( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -390,7 +399,10 @@ def put_optional_body( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -444,7 +456,10 @@ def put_optional_binary_body( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -487,7 +502,10 @@ def get_required_global_path(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -530,7 +548,10 @@ def get_required_global_query(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -573,7 +594,10 @@ def get_optional_global_query(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py index 70a469bbab0..8551575a5d6 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_path_items_operations.py @@ -116,7 +116,10 @@ async def get_all_with_values( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -183,7 +186,10 @@ async def get_global_query_null( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -250,7 +256,10 @@ async def get_global_and_local_query_null( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -316,7 +325,10 @@ async def get_local_path_item_query_null( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py index b773fe31edb..d0f84db3c65 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_paths_operations.py @@ -118,7 +118,10 @@ async def get_boolean_true(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -162,7 +165,10 @@ async def get_boolean_false(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -206,7 +212,10 @@ async def get_int_one_million(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -250,7 +259,10 @@ async def get_int_negative_one_million(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -294,7 +306,10 @@ async def get_ten_billion(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -338,7 +353,10 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -382,7 +400,10 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -426,7 +447,10 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -470,7 +494,10 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -514,7 +541,10 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -558,7 +588,10 @@ async def string_unicode(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -602,7 +635,10 @@ async def string_url_encoded(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -648,7 +684,10 @@ async def string_url_non_encoded(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -692,7 +731,10 @@ async def string_empty(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -737,7 +779,10 @@ async def string_null(self, string_path: str, **kwargs: Any) -> None: if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -783,7 +828,10 @@ async def enum_valid(self, enum_path: Union[str, _models.UriColor], **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -829,7 +877,10 @@ async def enum_null(self, enum_path: Union[str, _models.UriColor], **kwargs: Any if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -874,7 +925,10 @@ async def byte_multi_byte(self, byte_path: bytes, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -918,7 +972,10 @@ async def byte_empty(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -963,7 +1020,10 @@ async def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1007,7 +1067,10 @@ async def date_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1053,7 +1116,10 @@ async def date_null(self, date_path: datetime.date, **kwargs: Any) -> None: if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1097,7 +1163,10 @@ async def date_time_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1142,7 +1211,10 @@ async def date_time_null(self, date_time_path: datetime.datetime, **kwargs: Any) if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1187,7 +1259,10 @@ async def base64_url(self, base64_url_path: bytes, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1234,7 +1309,10 @@ async def array_csv_in_path(self, array_path: list[str], **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1279,7 +1357,10 @@ async def unix_time_url(self, unix_time_url_path: datetime.datetime, **kwargs: A if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py index 774bb2e0ee1..f8a58bd0a2c 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/aio/operations/_queries_operations.py @@ -127,7 +127,10 @@ async def get_boolean_true(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -171,7 +174,10 @@ async def get_boolean_false(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -216,7 +222,10 @@ async def get_boolean_null(self, bool_query: Optional[bool] = None, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -260,7 +269,10 @@ async def get_int_one_million(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -304,7 +316,10 @@ async def get_int_negative_one_million(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -349,7 +364,10 @@ async def get_int_null(self, int_query: Optional[int] = None, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -393,7 +411,10 @@ async def get_ten_billion(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -437,7 +458,10 @@ async def get_negative_ten_billion(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -482,7 +506,10 @@ async def get_long_null(self, long_query: Optional[int] = None, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -526,7 +553,10 @@ async def float_scientific_positive(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -570,7 +600,10 @@ async def float_scientific_negative(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -615,7 +648,10 @@ async def float_null(self, float_query: Optional[float] = None, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -659,7 +695,10 @@ async def double_decimal_positive(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -703,7 +742,10 @@ async def double_decimal_negative(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -748,7 +790,10 @@ async def double_null(self, double_query: Optional[float] = None, **kwargs: Any) if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -794,7 +839,10 @@ async def string_unicode(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -840,7 +888,10 @@ async def string_url_encoded(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -884,7 +935,10 @@ async def string_empty(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -929,7 +983,10 @@ async def string_null(self, string_query: Optional[str] = None, **kwargs: Any) - if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -975,7 +1032,10 @@ async def enum_valid(self, enum_query: Optional[Union[str, _models.UriColor]] = if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1021,7 +1081,10 @@ async def enum_null(self, enum_query: Optional[Union[str, _models.UriColor]] = N if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1067,7 +1130,10 @@ async def byte_multi_byte(self, byte_query: Optional[bytes] = None, **kwargs: An if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1111,7 +1177,10 @@ async def byte_empty(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1156,7 +1225,10 @@ async def byte_null(self, byte_query: Optional[bytes] = None, **kwargs: Any) -> if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1200,7 +1272,10 @@ async def date_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1245,7 +1320,10 @@ async def date_null(self, date_query: Optional[datetime.date] = None, **kwargs: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1291,7 +1369,10 @@ async def date_time_valid(self, **kwargs: Any) -> None: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1336,7 +1417,10 @@ async def date_time_null(self, date_time_query: Optional[datetime.datetime] = No if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1383,7 +1467,10 @@ async def array_string_csv_valid(self, array_query: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1428,7 +1515,10 @@ async def array_string_csv_null(self, array_query: Optional[list[str]] = None, * if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1474,7 +1564,10 @@ async def array_string_csv_empty(self, array_query: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1523,7 +1616,10 @@ async def array_string_no_collection_format_empty( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1570,7 +1666,10 @@ async def array_string_ssv_valid(self, array_query: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1617,7 +1716,10 @@ async def array_string_tsv_valid(self, array_query: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1664,7 +1766,10 @@ async def array_string_pipes_valid(self, array_query: Optional[list[str]] = None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py index c4a6a07510a..6edea4c6980 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_path_items_operations.py @@ -282,7 +282,10 @@ def get_all_with_values( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -349,7 +352,10 @@ def get_global_query_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -416,7 +422,10 @@ def get_global_and_local_query_null( # pylint: disable=inconsistent-return-stat if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -482,7 +491,10 @@ def get_local_path_item_query_null( # pylint: disable=inconsistent-return-state if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py index 467ffe2e967..0e9dead5f6f 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py @@ -627,7 +627,10 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -671,7 +674,10 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -715,7 +721,10 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -759,7 +768,10 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -803,7 +815,10 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -847,7 +862,10 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -891,7 +909,10 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -935,7 +956,10 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -979,7 +1003,10 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1023,7 +1050,10 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1067,7 +1097,10 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1111,7 +1144,10 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1157,7 +1193,10 @@ def string_url_non_encoded(self, **kwargs: Any) -> None: # pylint: disable=inco if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1201,7 +1240,10 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1246,7 +1288,10 @@ def string_null(self, string_path: str, **kwargs: Any) -> None: # pylint: disab if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1294,7 +1339,10 @@ def enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1342,7 +1390,10 @@ def enum_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1389,7 +1440,10 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1433,7 +1487,10 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1478,7 +1535,10 @@ def byte_null(self, byte_path: bytes, **kwargs: Any) -> None: # pylint: disable if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1522,7 +1582,10 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1570,7 +1633,10 @@ def date_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1614,7 +1680,10 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1661,7 +1730,10 @@ def date_time_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [400]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1708,7 +1780,10 @@ def base64_url( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1757,7 +1832,10 @@ def array_csv_in_path( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1804,7 +1882,10 @@ def unix_time_url( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py index c3abbbeae9d..e9a34eab082 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Url/url/operations/_queries_operations.py @@ -769,7 +769,10 @@ def get_boolean_true(self, **kwargs: Any) -> None: # pylint: disable=inconsiste if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -813,7 +816,10 @@ def get_boolean_false(self, **kwargs: Any) -> None: # pylint: disable=inconsist if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -860,7 +866,10 @@ def get_boolean_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -904,7 +913,10 @@ def get_int_one_million(self, **kwargs: Any) -> None: # pylint: disable=inconsi if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -948,7 +960,10 @@ def get_int_negative_one_million(self, **kwargs: Any) -> None: # pylint: disabl if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -995,7 +1010,10 @@ def get_int_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1039,7 +1057,10 @@ def get_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1083,7 +1104,10 @@ def get_negative_ten_billion(self, **kwargs: Any) -> None: # pylint: disable=in if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1130,7 +1154,10 @@ def get_long_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1174,7 +1201,10 @@ def float_scientific_positive(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1218,7 +1248,10 @@ def float_scientific_negative(self, **kwargs: Any) -> None: # pylint: disable=i if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1265,7 +1298,10 @@ def float_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1309,7 +1345,10 @@ def double_decimal_positive(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1353,7 +1392,10 @@ def double_decimal_negative(self, **kwargs: Any) -> None: # pylint: disable=inc if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1400,7 +1442,10 @@ def double_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1446,7 +1491,10 @@ def string_unicode(self, **kwargs: Any) -> None: # pylint: disable=inconsistent if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1492,7 +1540,10 @@ def string_url_encoded(self, **kwargs: Any) -> None: # pylint: disable=inconsis if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1536,7 +1587,10 @@ def string_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-r if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1583,7 +1637,10 @@ def string_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1631,7 +1688,10 @@ def enum_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1679,7 +1739,10 @@ def enum_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1727,7 +1790,10 @@ def byte_multi_byte( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1771,7 +1837,10 @@ def byte_empty(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1818,7 +1887,10 @@ def byte_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1862,7 +1934,10 @@ def date_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1909,7 +1984,10 @@ def date_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1955,7 +2033,10 @@ def date_time_valid(self, **kwargs: Any) -> None: # pylint: disable=inconsisten if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2002,7 +2083,10 @@ def date_time_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2051,7 +2135,10 @@ def array_string_csv_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2098,7 +2185,10 @@ def array_string_csv_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2146,7 +2236,10 @@ def array_string_csv_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2195,7 +2288,10 @@ def array_string_no_collection_format_empty( # pylint: disable=inconsistent-ret if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2244,7 +2340,10 @@ def array_string_ssv_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2293,7 +2392,10 @@ def array_string_tsv_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2342,7 +2444,10 @@ def array_string_pipes_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py index 2cb7749d847..fadbc3fa2bb 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/aio/operations/_queries_operations.py @@ -94,7 +94,10 @@ async def array_string_multi_null(self, array_query: Optional[list[str]] = None, if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -140,7 +143,10 @@ async def array_string_multi_empty(self, array_query: Optional[list[str]] = None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -187,7 +193,10 @@ async def array_string_multi_valid(self, array_query: Optional[list[str]] = None if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py index 55ef45c8c9f..d6ba9ca9a02 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/UrlMultiCollectionFormat/urlmulticollectionformat/operations/_queries_operations.py @@ -158,7 +158,10 @@ def array_string_multi_null( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -206,7 +209,10 @@ def array_string_multi_empty( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -255,7 +261,10 @@ def array_string_multi_valid( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py index 219f68c7937..96f67c1110d 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/aio/operations/_auto_rest_validation_test_operations.py @@ -90,7 +90,10 @@ async def validation_of_method_parameters( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Product", pipeline_response.http_response) @@ -220,7 +223,10 @@ async def validation_of_body( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Product", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py index 398c8bb5477..29a6848a9b4 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Validation/validation/operations/_auto_rest_validation_test_operations.py @@ -184,7 +184,10 @@ def validation_of_method_parameters(self, resource_group_name: str, id: int, **k if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Product", pipeline_response.http_response) @@ -314,7 +317,10 @@ def validation_of_body( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Product", pipeline_response.http_response) diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py index 9c154ba3096..60f7706e7b1 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/aio/operations/_xml_operations.py @@ -310,7 +310,10 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Slideshow", pipeline_response.http_response) @@ -363,7 +366,10 @@ async def put_simple(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -457,7 +463,10 @@ async def put_wrapped_lists(self, wrapped_lists: _models.AppleBarrel, **kwargs: if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1546,7 +1555,10 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithByteProperty", pipeline_response.http_response) @@ -1600,7 +1612,10 @@ async def put_binary(self, bytes: Optional[bytes] = None, **kwargs: Any) -> None if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1642,7 +1657,10 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithUrlProperty", pipeline_response.http_response) @@ -1696,7 +1714,10 @@ async def put_uri(self, url: Optional[str] = None, **kwargs: Any) -> None: if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py index 6dc7606809a..15d1b8dc110 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/operations/_xml_operations.py @@ -806,7 +806,10 @@ def get_simple(self, **kwargs: Any) -> _models.Slideshow: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Slideshow", pipeline_response.http_response) @@ -861,7 +864,10 @@ def put_simple( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -957,7 +963,10 @@ def put_wrapped_lists( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2064,7 +2073,10 @@ def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithByteProperty", pipeline_response.http_response) @@ -2120,7 +2132,10 @@ def put_binary( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2162,7 +2177,10 @@ def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithUrlProperty", pipeline_response.http_response) @@ -2218,7 +2236,10 @@ def put_uri( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py index dbc24659f4a..01ef07711ea 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/aio/operations/_pet_operations.py @@ -95,7 +95,10 @@ async def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[_models.Pe map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 404: - error = self._deserialize.failsafe_deserialize(_models.NotFoundErrorBase, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.NotFoundErrorBase, + pipeline_response, + ) raise ResourceNotFoundError(response=response, model=error) raise HttpResponseError(response=response, model=error) @@ -149,9 +152,15 @@ async def do_something(self, what_action: str, **kwargs: Any) -> _models.PetActi map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 500: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) else: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAction", pipeline_response.http_response) @@ -204,9 +213,15 @@ async def has_models_param(self, models: str = "value1", **kwargs: Any) -> None: map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 500: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) else: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py index 2ac6c07f0f4..0d238ea3fea 100644 --- a/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py +++ b/packages/autorest.python/test/vanilla/legacy/Expected/AcceptanceTests/XmsErrorResponse/xmserrorresponse/operations/_pet_operations.py @@ -151,7 +151,10 @@ def get_pet_by_id(self, pet_id: str, **kwargs: Any) -> Optional[_models.Pet]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 404: - error = self._deserialize.failsafe_deserialize(_models.NotFoundErrorBase, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.NotFoundErrorBase, + pipeline_response, + ) raise ResourceNotFoundError(response=response, model=error) raise HttpResponseError(response=response, model=error) @@ -205,9 +208,15 @@ def do_something(self, what_action: str, **kwargs: Any) -> _models.PetAction: map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 500: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) else: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("PetAction", pipeline_response.http_response) @@ -262,9 +271,15 @@ def has_models_param( # pylint: disable=inconsistent-return-statements map_error(status_code=response.status_code, response=response, error_map=error_map) error = None if response.status_code == 500: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) else: - error = self._deserialize.failsafe_deserialize(_models.PetActionError, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.PetActionError, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py index c5f48249b14..1e5710657aa 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/aio/operations/_operations.py @@ -311,7 +311,10 @@ async def get_simple(self, **kwargs: Any) -> _models.Slideshow: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Slideshow", pipeline_response.http_response) @@ -364,7 +367,10 @@ async def put_simple(self, slideshow: _models.Slideshow, **kwargs: Any) -> None: if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -458,7 +464,10 @@ async def put_wrapped_lists(self, wrapped_lists: _models.AppleBarrel, **kwargs: if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1585,7 +1594,10 @@ async def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithByteProperty", pipeline_response.http_response) @@ -1638,7 +1650,10 @@ async def put_binary(self, slideshow: _models.ModelWithByteProperty, **kwargs: A if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -1680,7 +1695,10 @@ async def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithUrlProperty", pipeline_response.http_response) @@ -1733,7 +1751,10 @@ async def put_uri(self, model: _models.ModelWithUrlProperty, **kwargs: Any) -> N if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py index 57df0f2d32f..b5eb6477c68 100644 --- a/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py +++ b/packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/XmlVersionTolerant/xmlserviceversiontolerant/operations/_operations.py @@ -813,7 +813,10 @@ def get_simple(self, **kwargs: Any) -> _models.Slideshow: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("Slideshow", pipeline_response.http_response) @@ -868,7 +871,10 @@ def put_simple( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -964,7 +970,10 @@ def put_wrapped_lists( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2109,7 +2118,10 @@ def get_bytes(self, **kwargs: Any) -> _models.ModelWithByteProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithByteProperty", pipeline_response.http_response) @@ -2164,7 +2176,10 @@ def put_binary( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: @@ -2206,7 +2221,10 @@ def get_uri(self, **kwargs: Any) -> _models.ModelWithUrlProperty: if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize("ModelWithUrlProperty", pipeline_response.http_response) @@ -2261,7 +2279,10 @@ def put_uri( # pylint: disable=inconsistent-return-statements if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response) + error = self._deserialize.failsafe_deserialize( + _models.Error, + pipeline_response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index 9baa11d6430..2a69618b303 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -67,7 +67,7 @@ "js-yaml": "~4.1.0", "semver": "~7.6.2", "tsx": "~4.19.1", - "@typespec/http-client-python": "~0.19.1", + "@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz", "fs-extra": "~11.2.0" }, "devDependencies": { diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py index 726032f3812..71f27f84b6b 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/aio/operations/_operations.py @@ -117,7 +117,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -288,7 +291,10 @@ async def create_with_system_assigned( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -459,7 +465,10 @@ async def update_with_user_assigned_and_system_assigned( # pylint: disable=name except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -545,7 +554,10 @@ async def get_for_predefined_error( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -712,7 +724,10 @@ async def create_for_user_defined_error( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.CloudError, response) + error = _failsafe_deserialize( + _models.CloudError, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py index cfa145517b8..132e8df4346 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-common-properties/azure/resourcemanager/commonproperties/operations/_operations.py @@ -269,7 +269,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -440,7 +443,10 @@ def create_with_system_assigned( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -611,7 +617,10 @@ def update_with_user_assigned_and_system_assigned( # pylint: disable=name-too-l except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -697,7 +706,10 @@ def get_for_predefined_error( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -864,7 +876,10 @@ def create_for_user_defined_error( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.CloudError, response) + error = _failsafe_deserialize( + _models.CloudError, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py index 2f73ac80366..9fbcc7a8e3c 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/aio/operations/_operations.py @@ -95,7 +95,10 @@ async def _two6_k_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py index b6ca9dfc67f..880ba8bf05d 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-large-header/azure/resourcemanager/largeheader/operations/_operations.py @@ -125,7 +125,10 @@ def _two6_k_initial(self, resource_group_name: str, large_header_name: str, **kw except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py index bdc1275e99f..04dff2924a3 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/aio/operations/_operations.py @@ -211,7 +211,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -291,7 +294,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -453,7 +459,10 @@ async def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -512,7 +521,10 @@ async def delete(self, subscription_id: str, subscription_resource1_name: str, * if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -591,7 +603,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -753,7 +768,10 @@ async def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -812,7 +830,10 @@ async def delete(self, subscription_id: str, subscription_resource2_name: str, * if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -891,7 +912,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1053,7 +1077,10 @@ async def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1112,7 +1139,10 @@ async def delete(self, subscription_id: str, subscription_resource_name: str, ** if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1193,7 +1223,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1360,7 +1393,10 @@ async def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1421,7 +1457,10 @@ async def delete(self, resource_group_name: str, resource_group_resource_name: s if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py index 9916658c069..97516dd1884 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-method-subscription-id/azure/resourcemanager/methodsubscriptionid/operations/_operations.py @@ -538,7 +538,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -618,7 +621,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -780,7 +786,10 @@ def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -841,7 +850,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -920,7 +932,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1082,7 +1097,10 @@ def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1143,7 +1161,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1220,7 +1241,10 @@ def get(self, subscription_id: str, subscription_resource_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1382,7 +1406,10 @@ def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1443,7 +1470,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1524,7 +1554,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1691,7 +1724,10 @@ def put( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1754,7 +1790,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py index 572199763cb..f090a3ee87f 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/aio/operations/_operations.py @@ -110,7 +110,10 @@ async def get(self, location: str, parameter: str, **kwargs: Any) -> _models.Non except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -256,7 +259,10 @@ async def create( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py index ec921b08535..9a28cb4198a 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-non-resource/azure/resourcemanager/nonresource/operations/_operations.py @@ -169,7 +169,10 @@ def get(self, location: str, parameter: str, **kwargs: Any) -> _models.NonResour except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -315,7 +318,10 @@ def create( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py index 42b023efd96..8bddb39ae06 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/aio/operations/_operations.py @@ -150,7 +150,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -289,7 +292,10 @@ async def check_global( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -430,7 +436,10 @@ async def check_local( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -513,7 +522,10 @@ async def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -745,7 +757,10 @@ async def _export_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -973,7 +988,10 @@ async def _delete_initial(self, resource_group_name: str, order_name: str, **kwa except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1116,7 +1134,10 @@ async def get(self, resource_group_name: str, widget_name: str, **kwargs: Any) - except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1286,7 +1307,10 @@ async def patch( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1456,7 +1480,10 @@ async def post( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1587,7 +1614,10 @@ async def provider_post( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py index f18da791b14..4a402769218 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-operation-templates/azure/resourcemanager/operationtemplates/operations/_operations.py @@ -421,7 +421,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -560,7 +563,10 @@ def check_global( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -701,7 +707,10 @@ def check_local( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -784,7 +793,10 @@ def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1012,7 +1024,10 @@ def _export_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1240,7 +1255,10 @@ def _delete_initial(self, resource_group_name: str, order_name: str, **kwargs: A except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1383,7 +1401,10 @@ def get(self, resource_group_name: str, widget_name: str, **kwargs: Any) -> _mod except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1553,7 +1574,10 @@ def patch( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1723,7 +1747,10 @@ def post( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1854,7 +1881,10 @@ def provider_post( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py index 732680535bd..10eb6524e92 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/aio/operations/_operations.py @@ -143,7 +143,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -212,7 +215,10 @@ async def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -449,7 +455,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -670,7 +679,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -828,7 +840,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -913,7 +928,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1068,7 +1086,10 @@ async def action_sync( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1154,7 +1175,10 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1225,7 +1249,10 @@ async def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1477,7 +1504,10 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1716,7 +1746,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1884,7 +1917,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1960,7 +1996,10 @@ async def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) - except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2027,7 +2066,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2320,7 +2362,10 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2417,7 +2462,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2494,7 +2542,10 @@ async def get(self, resource_uri: str, extensions_resource_name: str, **kwargs: except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2562,7 +2613,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2895,7 +2949,10 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2955,7 +3012,10 @@ async def delete(self, resource_uri: str, extensions_resource_name: str, **kwarg if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3042,7 +3102,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3119,7 +3182,10 @@ async def get(self, location: str, location_resource_name: str, **kwargs: Any) - except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3281,7 +3347,10 @@ async def create_or_update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3443,7 +3512,10 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3503,7 +3575,10 @@ async def delete(self, location: str, location_resource_name: str, **kwargs: Any if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3590,7 +3665,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py index 32dbeab74da..49ac4aa326e 100644 --- a/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/azure-resource-manager-resources/azure/resourcemanager/resources/operations/_operations.py @@ -875,7 +875,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -944,7 +947,10 @@ def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1181,7 +1187,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1402,7 +1411,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1560,7 +1572,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1645,7 +1660,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1800,7 +1818,10 @@ def action_sync( # pylint: disable=inconsistent-return-statements if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1886,7 +1907,10 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1957,7 +1981,10 @@ def _create_or_replace_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2209,7 +2236,10 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2448,7 +2478,10 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2616,7 +2649,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2692,7 +2728,10 @@ def get_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> _mod except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2759,7 +2798,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3052,7 +3094,10 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3149,7 +3194,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3226,7 +3274,10 @@ def get(self, resource_uri: str, extensions_resource_name: str, **kwargs: Any) - except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3294,7 +3345,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3627,7 +3681,10 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3689,7 +3746,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3776,7 +3836,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3853,7 +3916,10 @@ def get(self, location: str, location_resource_name: str, **kwargs: Any) -> _mod except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4015,7 +4081,10 @@ def create_or_update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4177,7 +4246,10 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4239,7 +4311,10 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4325,7 +4400,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py index 2a7a0fdd290..50fb3527718 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py @@ -101,7 +101,10 @@ def error_response_status_code_in_range( # pylint: disable=inconsistent-return- if 494 <= response.status_code <= 499: error = _failsafe_deserialize(_models.ErrorInRange, response) else: - error = _failsafe_deserialize(_models.DefaultError, response) + error = _failsafe_deserialize( + _models.DefaultError, + response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py index ff347f80127..9956fbab1df 100644 --- a/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py +++ b/packages/typespec-python/test/azure/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py @@ -82,7 +82,10 @@ async def error_response_status_code_in_range(self, **kwargs: Any) -> None: if 494 <= response.status_code <= 499: error = _failsafe_deserialize(_models.ErrorInRange, response) else: - error = _failsafe_deserialize(_models.DefaultError, response) + error = _failsafe_deserialize( + _models.DefaultError, + response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py index a5d6b90f803..489f4f7c162 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/_operations/_operations.py @@ -91,7 +91,10 @@ def error_response_status_code_in_range( # pylint: disable=inconsistent-return- if 494 <= response.status_code <= 499: error = _failsafe_deserialize(_models.ErrorInRange, response) else: - error = _failsafe_deserialize(_models.DefaultError, response) + error = _failsafe_deserialize( + _models.DefaultError, + response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py index 091a6eac114..9891adbc09e 100644 --- a/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py +++ b/packages/typespec-python/test/unbranded/generated/response-status-code-range/response/statuscoderange/aio/_operations/_operations.py @@ -73,7 +73,10 @@ async def error_response_status_code_in_range(self, **kwargs: Any) -> None: if 494 <= response.status_code <= 499: error = _failsafe_deserialize(_models.ErrorInRange, response) else: - error = _failsafe_deserialize(_models.DefaultError, response) + error = _failsafe_deserialize( + _models.DefaultError, + response, + ) raise HttpResponseError(response=response, model=error) if cls: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 302b987a7ad..b2fad8f9830 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ~1.0.2 version: 1.0.2 '@typespec/http-client-python': - specifier: ~0.19.1 - version: 0.19.1(v262dab2qaapor3zxkb4zsb4ba) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz(v262dab2qaapor3zxkb4zsb4ba) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -82,8 +82,8 @@ importers: packages/typespec-python: dependencies: '@typespec/http-client-python': - specifier: ~0.19.1 - version: 0.19.1(v262dab2qaapor3zxkb4zsb4ba) + specifier: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz + version: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz(v262dab2qaapor3zxkb4zsb4ba) fs-extra: specifier: ~11.2.0 version: 11.2.0 @@ -1681,8 +1681,9 @@ packages: peerDependencies: '@typespec/compiler': ^1.5.0 - '@typespec/http-client-python@0.19.1': - resolution: {integrity: sha512-locwViJwAG/hL3ePrzTjc3iPZE2D1AY4A3TFq7X+SGHGb/ayXDanihKiIkGJMZRL1f7ejuTw2KGQZMHdSOhH4w==} + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz': + resolution: {tarball: https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz} + version: 0.19.1 engines: {node: '>=20.0.0'} peerDependencies: '@azure-tools/typespec-autorest': '>=0.61.0 <1.0.0' @@ -6465,7 +6466,7 @@ snapshots: dependencies: '@typespec/compiler': 1.5.0(@types/node@24.1.0) - '@typespec/http-client-python@0.19.1(v262dab2qaapor3zxkb4zsb4ba)': + '@typespec/http-client-python@https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTQzNDg4MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.19.1.tgz(v262dab2qaapor3zxkb4zsb4ba)': dependencies: '@azure-tools/typespec-autorest': 0.61.0(yehncn3lp4xzygpesuojuhtg7i) '@azure-tools/typespec-azure-core': 0.61.0(@typespec/compiler@1.5.0(@types/node@24.1.0))(@typespec/http@1.5.0(@typespec/compiler@1.5.0(@types/node@24.1.0))(@typespec/streams@0.75.0(@typespec/compiler@1.5.0(@types/node@24.1.0))))(@typespec/rest@0.75.0(@typespec/compiler@1.5.0(@types/node@24.1.0))(@typespec/http@1.5.0(@typespec/compiler@1.5.0(@types/node@24.1.0))(@typespec/streams@0.75.0(@typespec/compiler@1.5.0(@types/node@24.1.0)))))