Skip to content

Commit 78af00d

Browse files
author
ci.datadog-api-spec
committed
pre-commit fixes
1 parent 51b467f commit 78af00d

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

src/datadog_api_client/api_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def __init__(self, configuration: Configuration):
5252

5353
self.rest_client = self._build_rest_client()
5454
self.default_headers = {}
55-
5655
if self.configuration.compress:
5756
self.default_headers["Accept-Encoding"] = "gzip"
5857
# Set default User-Agent.
@@ -195,7 +194,6 @@ def deserialize(self, response_data: str, response_type: Any, check_type: Option
195194

196195
# store our data under the key of 'received_data' so users have some
197196
# context if they are deserializing a string and the data type is wrong
198-
199197
deserialized_data = validate_and_convert_types(
200198
received_data,
201199
response_type,

src/datadog_api_client/model_utils.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,12 +1314,7 @@ def is_valid_type(input_class_simple, valid_classes):
13141314

13151315

13161316
def validate_and_convert_types(
1317-
input_value,
1318-
required_types_mixed,
1319-
path_to_item,
1320-
spec_property_naming,
1321-
check_type,
1322-
configuration=None,
1317+
input_value, required_types_mixed, path_to_item, spec_property_naming, check_type, configuration=None
13231318
):
13241319
"""Raises a TypeError is there is a problem, otherwise returns value.
13251320
@@ -1341,6 +1336,7 @@ def validate_and_convert_types(
13411336
:param configuration:: The configuration class to use when converting
13421337
file_type items.
13431338
:type configuration: Configuration
1339+
13441340
:return: The correctly typed value.
13451341
13461342
:raise: ApiTypeError
@@ -1589,11 +1585,7 @@ def _build_discriminator_map(cls):
15891585
break
15901586
matched = False
15911587
for type_cls in type_types:
1592-
if (
1593-
isinstance(type_cls, type)
1594-
and issubclass(type_cls, ModelSimple)
1595-
and type_cls.allowed_values
1596-
):
1588+
if isinstance(type_cls, type) and issubclass(type_cls, ModelSimple) and type_cls.allowed_values:
15971589
conflicted = False
15981590
for val in type_cls.allowed_values:
15991591
if val in disc_map and disc_map[val] is not oneof_class:

0 commit comments

Comments
 (0)