Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/datadog_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def __init__(
settings: Dict[str, Any],
params_map: Dict[str, Dict[str, Any]],
headers_map: Dict[str, List[str]],
api_client: ApiClient,
api_client: "ApiClient",
):
"""Creates an endpoint.

Expand Down Expand Up @@ -653,6 +653,7 @@ def __init__(
:param api_client API client instance.
:type api_client: ApiClient
"""
# Direct attribute assignments are fastest in Python
self.settings = settings
self.params_map = params_map
self.headers_map = headers_map
Expand Down Expand Up @@ -778,11 +779,15 @@ def _validate_and_get_host(self, kwargs):
return host

def call_with_http_info(self, **kwargs):
host = self._validate_and_get_host(kwargs)
# Local variable usages improve attribute lookup time
_validate_and_get_host = self._validate_and_get_host
_gather_params = self.gather_params
_call_api = self.api_client.call_api

params = self.gather_params(kwargs)
host = _validate_and_get_host(kwargs)
params = _gather_params(kwargs)

return self.api_client.call_api(
return _call_api(
self.settings["endpoint_path"],
self.settings["http_method"],
params["path"],
Expand Down
3 changes: 1 addition & 2 deletions src/datadog_api_client/v2/api/application_security_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ def list_application_security_waf_custom_rules(

:rtype: ApplicationSecurityWafCustomRuleListResponse
"""
kwargs: Dict[str, Any] = {}
return self._list_application_security_waf_custom_rules_endpoint.call_with_http_info(**kwargs)
return self._list_application_security_waf_custom_rules_endpoint.call_with_http_info()

def list_application_security_waf_exclusion_filters(
self,
Expand Down