You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/07/14 08:33:21 UTC
[GitHub] [airflow] OmairK commented on a change in pull request #9775: improve typing for datadog provider
OmairK commented on a change in pull request #9775:
URL: https://github.com/apache/airflow/pull/9775#discussion_r454193918
##########
File path: airflow/providers/datadog/hooks/datadog.py
##########
@@ -115,8 +120,16 @@ def query_metric(self,
return response
# pylint: disable=too-many-arguments
- def post_event(self, title, text, aggregation_key=None, alert_type=None, date_happened=None,
- handle=None, priority=None, related_event_id=None, tags=None, device_name=None):
+ def post_event(self, title: str,
+ text: str,
+ aggregation_key: Optional[str] = None,
+ alert_type: Optional[str] = None,
+ date_happened: Optional[int] = None,
+ handle: Optional[str] = None,
+ priority: Optional[str] = None,
+ related_event_id: Optional[str] = None,
Review comment:
`related_event_id` is of type `int64` in the [Datadog API](https://docs.datadoghq.com/api/v1/events/#get-an-event). So in my opinion an `int` would be the proper choice here.
----------------------------------------------------------------
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:
users@infra.apache.org