python: Modernize legacy Python 2 syntax with pyupgrade.

Generated by `pyupgrade --py3-plus --keep-percent-format` on all our
Python code except `zthumbor` and `zulip-ec2-configure-interfaces`,
followed by manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-09 12:51:58 -07:00
committed by Tim Abbott
parent fff2d3958a
commit c734bbd95d
567 changed files with 1877 additions and 2564 deletions

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from urllib.parse import quote, unquote
from zerver.lib.test_classes import WebhookTestCase
@@ -7,7 +6,7 @@ from zerver.lib.users import get_api_key
class JiraHookTests(WebhookTestCase):
STREAM_NAME = 'jira'
URL_TEMPLATE = u"/api/v1/external/jira?api_key={api_key}&stream={stream}"
URL_TEMPLATE = "/api/v1/external/jira?api_key={api_key}&stream={stream}"
def test_custom_stream(self) -> None:
api_key = get_api_key(self.test_user)
@@ -91,7 +90,7 @@ Leo Franchi created [BUG-15: New bug with hook](http://lfranchi.com:8080/browse/
self.send_and_test_stream_message('created_v1', expected_topic, expected_message)
def test_created_with_unicode(self) -> None:
expected_topic = u"BUG-15: New bug with à hook"
expected_topic = "BUG-15: New bug with à hook"
expected_message = """
Leo Franchià created [BUG-15: New bug with à hook](http://lfranchi.com:8080/browse/BUG-15):