From a2177570b38e48be13eb9da930f634f93f4b68ac Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 2 Sep 2023 01:07:33 +0800 Subject: [PATCH] update python samples --- .../python-aiohttp/petstore_api/api/fake_api.py | 13 +++++++------ .../petstore/python/petstore_api/api/fake_api.py | 13 +++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py index 292a52965c3..201644a2177 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/api/fake_api.py @@ -1599,10 +1599,10 @@ class FakeApi: :type uuid_example: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. @@ -1610,7 +1610,8 @@ class FakeApi: """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + message = "Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) if async_req is not None: kwargs['async_req'] = async_req return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 @@ -1630,7 +1631,7 @@ class FakeApi: :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the + be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True. :type _preload_content: bool, optional diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py index 16378e0d38f..df112200f14 100755 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -1490,10 +1490,10 @@ class FakeApi: :type uuid_example: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. @@ -1501,7 +1501,8 @@ class FakeApi: """ kwargs['_return_http_data_only'] = True if '_preload_content' in kwargs: - raise ValueError("Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") + message = "Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 @validate_arguments @@ -1519,7 +1520,7 @@ class FakeApi: :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the ApiResponse.data will - be set to none and raw_data will store the + be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True. :type _preload_content: bool, optional