def update_alert(self, alert_id, query, name=None, message=None, silenced=False,
            notify_no_data=None, timeout_h=None, silenced_timeout_ts=None):
        """
        Update the metric alert identified by *alert_id* with the given
        *query*. If *name* is unset, the alert will be given a name based on
        the query. The *message* will accompany any notifications sent for the
        alert and can contain the same '@' notation as events to alert
        individual users. The *silenced* flag controls whether or not
        notifications are sent for alert state changes.

        >>> dog_http_api.update_alert(1234, "sum(last_1d):sum:system.net.bytes_rcvd{host:host0} > 100")
        """
        body = {
            'query':  query,
            'silenced': silenced,
        }
        if name:
            body['name'] = name
        if message:
            body['message'] = message
        if notify_no_data:
            body['notify_no_data'] = notify_no_data
        if timeout_h:
            body['timeout_h'] = timeout_h
        if silenced_timeout_ts:
            body['silenced_timeout_ts']

        return self.http_request('PUT', alert_id % '/alert/%s', body,
            response_formatter=lambda x: x['id'],
        )
dataset/ETHPy150Open DataDog/dogapi/src/dogapi/http/alerts.py/AlertApi.update_alert/swapped operands of `%`