python: Further pyupgrade changes.

Generated by pyupgrade --py3-plus --keep-percent-format.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-06-08 15:23:10 -07:00
parent 444fbbf964
commit 8c15081069
5 changed files with 3 additions and 7 deletions

View File

@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.24 on 2019-09-24 00:15
from __future__ import unicode_literals
from django.db import migrations

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase

View File

@@ -8,9 +8,9 @@ from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.models import UserProfile
GRAFANA_TOPIC_TEMPLATE = u'{alert_title}'
GRAFANA_TOPIC_TEMPLATE = '{alert_title}'
GRAFANA_MESSAGE_TEMPLATE = u'[{rule_name}]({rule_url})\n\n{alert_message}{eval_matches}'
GRAFANA_MESSAGE_TEMPLATE = '[{rule_name}]({rule_url})\n\n{alert_message}{eval_matches}'
@api_key_only_webhook_view('Grafana')
@has_request_variables

View File

@@ -225,7 +225,7 @@ def api_sentry_webhook(request: HttpRequest, user_profile: UserProfile,
elif "issue" in data:
subject, body = handle_issue_payload(payload["action"], data["issue"], payload["actor"])
else:
raise UnexpectedWebhookEventType("Sentry", str((list(data.keys()))))
raise UnexpectedWebhookEventType("Sentry", str(list(data.keys())))
else:
subject, body = handle_deprecated_payload(payload)

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase