From 268196e7f66fe2cc3d228df205b53c6f0f3fab8c Mon Sep 17 00:00:00 2001 From: Shenghan Gao Date: Fri, 24 May 2019 09:10:11 -0700 Subject: [PATCH] [Python] Remove unnecessary if else. (#2985) * Remove Unnecessary `if else` * update samples --- .../src/main/resources/python/api.mustache | 6 +- .../petstore_api/api/another_fake_api.py | 6 +- .../petstore_api/api/fake_api.py | 78 ++++--------------- .../api/fake_classname_tags_123_api.py | 6 +- .../petstore_api/api/pet_api.py | 54 +++---------- .../petstore_api/api/store_api.py | 24 +----- .../petstore_api/api/user_api.py | 48 ++---------- .../petstore_api/api/another_fake_api.py | 6 +- .../petstore_api/api/fake_api.py | 78 ++++--------------- .../api/fake_classname_tags_123_api.py | 6 +- .../petstore_api/api/pet_api.py | 54 +++---------- .../petstore_api/api/store_api.py | 24 +----- .../petstore_api/api/user_api.py | 48 ++---------- .../petstore_api/api/another_fake_api.py | 6 +- .../python/petstore_api/api/fake_api.py | 78 ++++--------------- .../api/fake_classname_tags_123_api.py | 6 +- .../python/petstore_api/api/pet_api.py | 54 +++---------- .../python/petstore_api/api/store_api.py | 24 +----- .../python/petstore_api/api/user_api.py | 48 ++---------- .../petstore_api/api/another_fake_api.py | 6 +- .../python/petstore_api/api/default_api.py | 6 +- .../python/petstore_api/api/fake_api.py | 78 ++++--------------- .../api/fake_classname_tags_123_api.py | 6 +- .../python/petstore_api/api/pet_api.py | 54 +++---------- .../python/petstore_api/api/store_api.py | 24 +----- .../python/petstore_api/api/user_api.py | 48 ++---------- 26 files changed, 146 insertions(+), 730 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api.mustache b/modules/openapi-generator/src/main/resources/python/api.mustache index e1f9f53dca1..4e0612d87d3 100644 --- a/modules/openapi-generator/src/main/resources/python/api.mustache +++ b/modules/openapi-generator/src/main/resources/python/api.mustache @@ -55,11 +55,7 @@ class {{classname}}(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 - else: - (data) = self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 - return data + return self.{{operationId}}_with_http_info({{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs) # noqa: E501 def {{operationId}}_with_http_info(self, {{#sortParamsByRequiredFlag}}{{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}{{/sortParamsByRequiredFlag}}**kwargs): # noqa: E501 """{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py index d44e05e78c1..8c9a16c685a 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/another_fake_api.py @@ -52,11 +52,7 @@ class AnotherFakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 """To test special tags # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 08b65780956..b39fff1fa3a 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -52,11 +52,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - else: - (data) = self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - return data + return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 """creates an XmlItem # noqa: E501 @@ -148,11 +144,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 @@ -240,11 +232,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_composite_serialize # noqa: E501 @@ -332,11 +320,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_number_serialize # noqa: E501 @@ -424,11 +408,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_string_serialize # noqa: E501 @@ -516,11 +496,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E501 """test_body_with_file_schema # noqa: E501 @@ -612,11 +588,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - return data + return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # noqa: E501 """test_body_with_query_params # noqa: E501 @@ -714,11 +686,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 """To test \"client\" model # noqa: E501 @@ -827,11 +795,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - else: - (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - return data + return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -1009,11 +973,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - return data + return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """To test enum parameters # noqa: E501 @@ -1130,11 +1090,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - else: - (data) = self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - return data + return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 def test_group_parameters_with_http_info(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1244,11 +1200,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - else: - (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - return data + return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 @@ -1339,11 +1291,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - else: - (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - return data + return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501 """test json serialization of form data # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py index 635d9682831..863beabd84c 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_classname_tags_123_api.py @@ -52,11 +52,7 @@ class FakeClassnameTags123Api(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 """To test class name in snake case # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py index 7bb32c68aa9..41ea60d1891 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/pet_api.py @@ -51,11 +51,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Add a new pet to the store # noqa: E501 @@ -146,11 +142,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Deletes a pet # noqa: E501 @@ -240,11 +232,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - return data + return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """Finds Pets by status # noqa: E501 @@ -337,11 +325,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - return data + return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """Finds Pets by tags # noqa: E501 @@ -434,11 +418,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Find pet by ID # noqa: E501 @@ -529,11 +509,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Update an existing pet # noqa: E501 @@ -625,11 +601,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Updates a pet in the store with form data # noqa: E501 @@ -727,11 +699,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """uploads an image # noqa: E501 @@ -833,11 +801,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - return data + return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 def upload_file_with_required_file_with_http_info(self, pet_id, required_file, **kwargs): # noqa: E501 """uploads an image (required) # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index 5ed68b1c3a6..73fec448706 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -52,11 +52,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """Delete purchase order by ID # noqa: E501 @@ -143,11 +139,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 - return data + return self.get_inventory_with_http_info(**kwargs) # noqa: E501 def get_inventory_with_http_info(self, **kwargs): # noqa: E501 """Returns pet inventories by status # noqa: E501 @@ -232,11 +224,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 @@ -331,11 +319,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.place_order_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.place_order_with_http_info(body, **kwargs) # noqa: E501 def place_order_with_http_info(self, body, **kwargs): # noqa: E501 """Place an order for a pet # noqa: E501 diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py index 923f6347a2b..2069503783d 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/user_api.py @@ -52,11 +52,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_user_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_user_with_http_info(body, **kwargs) # noqa: E501 def create_user_with_http_info(self, body, **kwargs): # noqa: E501 """Create user # noqa: E501 @@ -143,11 +139,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -233,11 +225,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -324,11 +312,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """Delete user # noqa: E501 @@ -415,11 +399,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """Get user by user name # noqa: E501 @@ -510,11 +490,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - else: - (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - return data + return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """Logs user into the system # noqa: E501 @@ -610,11 +586,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.logout_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.logout_user_with_http_info(**kwargs) # noqa: E501 def logout_user_with_http_info(self, **kwargs): # noqa: E501 """Logs out current logged in user session # noqa: E501 @@ -695,11 +667,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - else: - (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - return data + return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 """Updated user # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py index d44e05e78c1..8c9a16c685a 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/another_fake_api.py @@ -52,11 +52,7 @@ class AnotherFakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 """To test special tags # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index 08b65780956..b39fff1fa3a 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -52,11 +52,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - else: - (data) = self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - return data + return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 """creates an XmlItem # noqa: E501 @@ -148,11 +144,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 @@ -240,11 +232,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_composite_serialize # noqa: E501 @@ -332,11 +320,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_number_serialize # noqa: E501 @@ -424,11 +408,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_string_serialize # noqa: E501 @@ -516,11 +496,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E501 """test_body_with_file_schema # noqa: E501 @@ -612,11 +588,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - return data + return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # noqa: E501 """test_body_with_query_params # noqa: E501 @@ -714,11 +686,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 """To test \"client\" model # noqa: E501 @@ -827,11 +795,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - else: - (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - return data + return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -1009,11 +973,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - return data + return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """To test enum parameters # noqa: E501 @@ -1130,11 +1090,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - else: - (data) = self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - return data + return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 def test_group_parameters_with_http_info(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1244,11 +1200,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - else: - (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - return data + return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 @@ -1339,11 +1291,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - else: - (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - return data + return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501 """test json serialization of form data # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py index 635d9682831..863beabd84c 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_classname_tags_123_api.py @@ -52,11 +52,7 @@ class FakeClassnameTags123Api(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 """To test class name in snake case # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py index 7bb32c68aa9..41ea60d1891 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/pet_api.py @@ -51,11 +51,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Add a new pet to the store # noqa: E501 @@ -146,11 +142,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Deletes a pet # noqa: E501 @@ -240,11 +232,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - return data + return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """Finds Pets by status # noqa: E501 @@ -337,11 +325,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - return data + return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """Finds Pets by tags # noqa: E501 @@ -434,11 +418,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Find pet by ID # noqa: E501 @@ -529,11 +509,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Update an existing pet # noqa: E501 @@ -625,11 +601,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Updates a pet in the store with form data # noqa: E501 @@ -727,11 +699,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """uploads an image # noqa: E501 @@ -833,11 +801,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - return data + return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 def upload_file_with_required_file_with_http_info(self, pet_id, required_file, **kwargs): # noqa: E501 """uploads an image (required) # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index 5ed68b1c3a6..73fec448706 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -52,11 +52,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """Delete purchase order by ID # noqa: E501 @@ -143,11 +139,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 - return data + return self.get_inventory_with_http_info(**kwargs) # noqa: E501 def get_inventory_with_http_info(self, **kwargs): # noqa: E501 """Returns pet inventories by status # noqa: E501 @@ -232,11 +224,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 @@ -331,11 +319,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.place_order_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.place_order_with_http_info(body, **kwargs) # noqa: E501 def place_order_with_http_info(self, body, **kwargs): # noqa: E501 """Place an order for a pet # noqa: E501 diff --git a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py index 923f6347a2b..2069503783d 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/user_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/user_api.py @@ -52,11 +52,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_user_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_user_with_http_info(body, **kwargs) # noqa: E501 def create_user_with_http_info(self, body, **kwargs): # noqa: E501 """Create user # noqa: E501 @@ -143,11 +139,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -233,11 +225,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -324,11 +312,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """Delete user # noqa: E501 @@ -415,11 +399,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """Get user by user name # noqa: E501 @@ -510,11 +490,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - else: - (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - return data + return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """Logs user into the system # noqa: E501 @@ -610,11 +586,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.logout_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.logout_user_with_http_info(**kwargs) # noqa: E501 def logout_user_with_http_info(self, **kwargs): # noqa: E501 """Logs out current logged in user session # noqa: E501 @@ -695,11 +667,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - else: - (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - return data + return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 """Updated user # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/client/petstore/python/petstore_api/api/another_fake_api.py index d44e05e78c1..8c9a16c685a 100644 --- a/samples/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/another_fake_api.py @@ -52,11 +52,7 @@ class AnotherFakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501 def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501 """To test special tags # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 08b65780956..b39fff1fa3a 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -52,11 +52,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - else: - (data) = self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 - return data + return self.create_xml_item_with_http_info(xml_item, **kwargs) # noqa: E501 def create_xml_item_with_http_info(self, xml_item, **kwargs): # noqa: E501 """creates an XmlItem # noqa: E501 @@ -148,11 +144,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 @@ -240,11 +232,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_composite_serialize # noqa: E501 @@ -332,11 +320,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_number_serialize # noqa: E501 @@ -424,11 +408,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_string_serialize # noqa: E501 @@ -516,11 +496,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_body_with_file_schema_with_http_info(body, **kwargs) # noqa: E501 def test_body_with_file_schema_with_http_info(self, body, **kwargs): # noqa: E501 """test_body_with_file_schema # noqa: E501 @@ -612,11 +588,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 - return data + return self.test_body_with_query_params_with_http_info(query, body, **kwargs) # noqa: E501 def test_body_with_query_params_with_http_info(self, query, body, **kwargs): # noqa: E501 """test_body_with_query_params # noqa: E501 @@ -714,11 +686,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_client_model_with_http_info(body, **kwargs) # noqa: E501 def test_client_model_with_http_info(self, body, **kwargs): # noqa: E501 """To test \"client\" model # noqa: E501 @@ -827,11 +795,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - else: - (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - return data + return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -1009,11 +973,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - return data + return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """To test enum parameters # noqa: E501 @@ -1130,11 +1090,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - else: - (data) = self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - return data + return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 def test_group_parameters_with_http_info(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1244,11 +1200,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - else: - (data) = self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 - return data + return self.test_inline_additional_properties_with_http_info(param, **kwargs) # noqa: E501 def test_inline_additional_properties_with_http_info(self, param, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 @@ -1339,11 +1291,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - else: - (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - return data + return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501 """test json serialization of form data # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index 635d9682831..863beabd84c 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -52,11 +52,7 @@ class FakeClassnameTags123Api(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.test_classname_with_http_info(body, **kwargs) # noqa: E501 def test_classname_with_http_info(self, body, **kwargs): # noqa: E501 """To test class name in snake case # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/pet_api.py b/samples/client/petstore/python/petstore_api/api/pet_api.py index 7bb32c68aa9..41ea60d1891 100644 --- a/samples/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/client/petstore/python/petstore_api/api/pet_api.py @@ -51,11 +51,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.add_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.add_pet_with_http_info(body, **kwargs) # noqa: E501 def add_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Add a new pet to the store # noqa: E501 @@ -146,11 +142,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Deletes a pet # noqa: E501 @@ -240,11 +232,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - return data + return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """Finds Pets by status # noqa: E501 @@ -337,11 +325,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - return data + return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """Finds Pets by tags # noqa: E501 @@ -434,11 +418,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Find pet by ID # noqa: E501 @@ -529,11 +509,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.update_pet_with_http_info(body, **kwargs) # noqa: E501 def update_pet_with_http_info(self, body, **kwargs): # noqa: E501 """Update an existing pet # noqa: E501 @@ -625,11 +601,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Updates a pet in the store with form data # noqa: E501 @@ -727,11 +699,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """uploads an image # noqa: E501 @@ -833,11 +801,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - return data + return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 def upload_file_with_required_file_with_http_info(self, pet_id, required_file, **kwargs): # noqa: E501 """uploads an image (required) # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/store_api.py b/samples/client/petstore/python/petstore_api/api/store_api.py index 5ed68b1c3a6..73fec448706 100644 --- a/samples/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/client/petstore/python/petstore_api/api/store_api.py @@ -52,11 +52,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """Delete purchase order by ID # noqa: E501 @@ -143,11 +139,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 - return data + return self.get_inventory_with_http_info(**kwargs) # noqa: E501 def get_inventory_with_http_info(self, **kwargs): # noqa: E501 """Returns pet inventories by status # noqa: E501 @@ -232,11 +224,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 @@ -331,11 +319,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.place_order_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.place_order_with_http_info(body, **kwargs) # noqa: E501 def place_order_with_http_info(self, body, **kwargs): # noqa: E501 """Place an order for a pet # noqa: E501 diff --git a/samples/client/petstore/python/petstore_api/api/user_api.py b/samples/client/petstore/python/petstore_api/api/user_api.py index 923f6347a2b..2069503783d 100644 --- a/samples/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/client/petstore/python/petstore_api/api/user_api.py @@ -52,11 +52,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_user_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_user_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_user_with_http_info(body, **kwargs) # noqa: E501 def create_user_with_http_info(self, body, **kwargs): # noqa: E501 """Create user # noqa: E501 @@ -143,11 +139,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_array_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_array_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -233,11 +225,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 - return data + return self.create_users_with_list_input_with_http_info(body, **kwargs) # noqa: E501 def create_users_with_list_input_with_http_info(self, body, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -324,11 +312,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """Delete user # noqa: E501 @@ -415,11 +399,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """Get user by user name # noqa: E501 @@ -510,11 +490,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - else: - (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - return data + return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """Logs user into the system # noqa: E501 @@ -610,11 +586,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.logout_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.logout_user_with_http_info(**kwargs) # noqa: E501 def logout_user_with_http_info(self, **kwargs): # noqa: E501 """Logs out current logged in user session # noqa: E501 @@ -695,11 +667,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - else: - (data) = self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 - return data + return self.update_user_with_http_info(username, body, **kwargs) # noqa: E501 def update_user_with_http_info(self, username, body, **kwargs): # noqa: E501 """Updated user # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py index 2978efbb952..597348f2660 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/another_fake_api.py @@ -52,11 +52,7 @@ class AnotherFakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 - else: - (data) = self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 - return data + return self.call_123_test_special_tags_with_http_info(client, **kwargs) # noqa: E501 def call_123_test_special_tags_with_http_info(self, client, **kwargs): # noqa: E501 """To test special tags # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py index 761b735ff1a..200c888c6d8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/default_api.py @@ -50,11 +50,7 @@ class DefaultApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.foo_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.foo_get_with_http_info(**kwargs) # noqa: E501 - return data + return self.foo_get_with_http_info(**kwargs) # noqa: E501 def foo_get_with_http_info(self, **kwargs): # noqa: E501 """foo_get # noqa: E501 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 61ebb8046fd..830e3e17af3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_api.py @@ -50,11 +50,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_health_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_health_get_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_health_get_with_http_info(**kwargs) # noqa: E501 def fake_health_get_with_http_info(self, **kwargs): # noqa: E501 """Health check endpoint # noqa: E501 @@ -138,11 +134,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_boolean_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_boolean_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_boolean_serialize # noqa: E501 @@ -234,11 +226,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_composite_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_composite_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_composite_serialize # noqa: E501 @@ -330,11 +318,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_number_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_number_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_number_serialize # noqa: E501 @@ -426,11 +410,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 - return data + return self.fake_outer_string_serialize_with_http_info(**kwargs) # noqa: E501 def fake_outer_string_serialize_with_http_info(self, **kwargs): # noqa: E501 """fake_outer_string_serialize # noqa: E501 @@ -522,11 +502,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 - return data + return self.test_body_with_file_schema_with_http_info(file_schema_test_class, **kwargs) # noqa: E501 def test_body_with_file_schema_with_http_info(self, file_schema_test_class, **kwargs): # noqa: E501 """test_body_with_file_schema # noqa: E501 @@ -618,11 +594,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 - else: - (data) = self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 - return data + return self.test_body_with_query_params_with_http_info(query, user, **kwargs) # noqa: E501 def test_body_with_query_params_with_http_info(self, query, user, **kwargs): # noqa: E501 """test_body_with_query_params # noqa: E501 @@ -720,11 +692,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 - else: - (data) = self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 - return data + return self.test_client_model_with_http_info(client, **kwargs) # noqa: E501 def test_client_model_with_http_info(self, client, **kwargs): # noqa: E501 """To test \"client\" model # noqa: E501 @@ -833,11 +801,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - else: - (data) = self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 - return data + return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 @@ -1015,11 +979,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 - return data + return self.test_enum_parameters_with_http_info(**kwargs) # noqa: E501 def test_enum_parameters_with_http_info(self, **kwargs): # noqa: E501 """To test enum parameters # noqa: E501 @@ -1136,11 +1096,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - else: - (data) = self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 - return data + return self.test_group_parameters_with_http_info(required_string_group, required_boolean_group, required_int64_group, **kwargs) # noqa: E501 def test_group_parameters_with_http_info(self, required_string_group, required_boolean_group, required_int64_group, **kwargs): # noqa: E501 """Fake endpoint to test group parameters (optional) # noqa: E501 @@ -1250,11 +1206,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 - else: - (data) = self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 - return data + return self.test_inline_additional_properties_with_http_info(request_body, **kwargs) # noqa: E501 def test_inline_additional_properties_with_http_info(self, request_body, **kwargs): # noqa: E501 """test inline additionalProperties # noqa: E501 @@ -1345,11 +1297,7 @@ class FakeApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - else: - (data) = self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 - return data + return self.test_json_form_data_with_http_info(param, param2, **kwargs) # noqa: E501 def test_json_form_data_with_http_info(self, param, param2, **kwargs): # noqa: E501 """test json serialization of form data # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py index bbfe983ef54..c7d67196ec7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/fake_classname_tags_123_api.py @@ -52,11 +52,7 @@ class FakeClassnameTags123Api(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.test_classname_with_http_info(client, **kwargs) # noqa: E501 - else: - (data) = self.test_classname_with_http_info(client, **kwargs) # noqa: E501 - return data + return self.test_classname_with_http_info(client, **kwargs) # noqa: E501 def test_classname_with_http_info(self, client, **kwargs): # noqa: E501 """To test class name in snake case # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py index 77cc4dac862..3398762d5ed 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/pet_api.py @@ -51,11 +51,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 - else: - (data) = self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 - return data + return self.add_pet_with_http_info(pet, **kwargs) # noqa: E501 def add_pet_with_http_info(self, pet, **kwargs): # noqa: E501 """Add a new pet to the store # noqa: E501 @@ -153,11 +149,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.delete_pet_with_http_info(pet_id, **kwargs) # noqa: E501 def delete_pet_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Deletes a pet # noqa: E501 @@ -247,11 +239,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 - return data + return self.find_pets_by_status_with_http_info(status, **kwargs) # noqa: E501 def find_pets_by_status_with_http_info(self, status, **kwargs): # noqa: E501 """Finds Pets by status # noqa: E501 @@ -344,11 +332,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - else: - (data) = self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 - return data + return self.find_pets_by_tags_with_http_info(tags, **kwargs) # noqa: E501 def find_pets_by_tags_with_http_info(self, tags, **kwargs): # noqa: E501 """Finds Pets by tags # noqa: E501 @@ -441,11 +425,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.get_pet_by_id_with_http_info(pet_id, **kwargs) # noqa: E501 def get_pet_by_id_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Find pet by ID # noqa: E501 @@ -536,11 +516,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 - return data + return self.update_pet_with_http_info(pet, **kwargs) # noqa: E501 def update_pet_with_http_info(self, pet, **kwargs): # noqa: E501 """Update an existing pet # noqa: E501 @@ -639,11 +615,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.update_pet_with_form_with_http_info(pet_id, **kwargs) # noqa: E501 def update_pet_with_form_with_http_info(self, pet_id, **kwargs): # noqa: E501 """Updates a pet in the store with form data # noqa: E501 @@ -741,11 +713,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 - return data + return self.upload_file_with_http_info(pet_id, **kwargs) # noqa: E501 def upload_file_with_http_info(self, pet_id, **kwargs): # noqa: E501 """uploads an image # noqa: E501 @@ -847,11 +815,7 @@ class PetApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - else: - (data) = self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 - return data + return self.upload_file_with_required_file_with_http_info(pet_id, required_file, **kwargs) # noqa: E501 def upload_file_with_required_file_with_http_info(self, pet_id, required_file, **kwargs): # noqa: E501 """uploads an image (required) # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py index 8df1ff4745b..4b9f3d383a0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/store_api.py @@ -52,11 +52,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501 def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501 """Delete purchase order by ID # noqa: E501 @@ -143,11 +139,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_inventory_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501 - return data + return self.get_inventory_with_http_info(**kwargs) # noqa: E501 def get_inventory_with_http_info(self, **kwargs): # noqa: E501 """Returns pet inventories by status # noqa: E501 @@ -232,11 +224,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - else: - (data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 - return data + return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501 def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 @@ -331,11 +319,7 @@ class StoreApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.place_order_with_http_info(order, **kwargs) # noqa: E501 - else: - (data) = self.place_order_with_http_info(order, **kwargs) # noqa: E501 - return data + return self.place_order_with_http_info(order, **kwargs) # noqa: E501 def place_order_with_http_info(self, order, **kwargs): # noqa: E501 """Place an order for a pet # noqa: E501 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py index daa4166b61f..d1c3cf4b193 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api/user_api.py @@ -52,11 +52,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_user_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.create_user_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.create_user_with_http_info(user, **kwargs) # noqa: E501 def create_user_with_http_info(self, user, **kwargs): # noqa: E501 """Create user # noqa: E501 @@ -147,11 +143,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.create_users_with_array_input_with_http_info(user, **kwargs) # noqa: E501 def create_users_with_array_input_with_http_info(self, user, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -241,11 +233,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 - return data + return self.create_users_with_list_input_with_http_info(user, **kwargs) # noqa: E501 def create_users_with_list_input_with_http_info(self, user, **kwargs): # noqa: E501 """Creates list of users with given input array # noqa: E501 @@ -336,11 +324,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.delete_user_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.delete_user_with_http_info(username, **kwargs) # noqa: E501 def delete_user_with_http_info(self, username, **kwargs): # noqa: E501 """Delete user # noqa: E501 @@ -427,11 +411,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - else: - (data) = self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 - return data + return self.get_user_by_name_with_http_info(username, **kwargs) # noqa: E501 def get_user_by_name_with_http_info(self, username, **kwargs): # noqa: E501 """Get user by user name # noqa: E501 @@ -522,11 +502,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - else: - (data) = self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 - return data + return self.login_user_with_http_info(username, password, **kwargs) # noqa: E501 def login_user_with_http_info(self, username, password, **kwargs): # noqa: E501 """Logs user into the system # noqa: E501 @@ -622,11 +598,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.logout_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.logout_user_with_http_info(**kwargs) # noqa: E501 - return data + return self.logout_user_with_http_info(**kwargs) # noqa: E501 def logout_user_with_http_info(self, **kwargs): # noqa: E501 """Logs out current logged in user session # noqa: E501 @@ -707,11 +679,7 @@ class UserApi(object): returns the request thread. """ kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 - else: - (data) = self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 - return data + return self.update_user_with_http_info(username, user, **kwargs) # noqa: E501 def update_user_with_http_info(self, username, user, **kwargs): # noqa: E501 """Updated user # noqa: E501