OmairK commented on a change in pull request #9775:
URL: https://github.com/apache/airflow/pull/9775#discussion_r456963464
##########
File path: airflow/providers/datadog/hooks/datadog.py
##########
@@ -55,15 +56,19 @@ def __init__(self, datadog_conn_id='datadog_default'):
self.log.info("Setting up api keys for Datadog")
initialize(api_key=self.api_key, app_key=self.app_key)
- def validate_response(self, response):
+ def validate_response(self, response: Dict[str, Any]) -> None:
"""
Validate Datadog response
"""
if response['status'] != 'ok':
self.log.error("Datadog returned: %s", response)
raise AirflowException("Error status received from Datadog")
- def send_metric(self, metric_name, datapoint, tags=None, type_=None,
interval=None):
+ def send_metric(self, metric_name: str,
+ datapoint: Union[float, int],
+ tags: Optional[List[Any]] = None,
Review comment:
```suggestion
tags: Optional[List[str]] = None,
```
What do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]