mypy: Convert more zerver/lib files to typing.Text.

This commit touches files in zerver/lib/bugdown/ and
zerver/lib/webhooks.
This commit is contained in:
Mikebarson
2016-12-05 06:05:33 +00:00
committed by Tim Abbott
parent c51d2c3d8f
commit 690d72d35f
4 changed files with 84 additions and 87 deletions

View File

@@ -1,8 +1,7 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from six import text_type
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, Text
import ujson
@@ -183,7 +182,7 @@ MEDIA_TWEET = """{
def twitter(tweet_id):
# type: (text_type) -> Optional[Dict[text_type, Any]]
# type: (Text) -> Optional[Dict[Text, Any]]
if tweet_id in ["112652479837110273", "287977969287315456", "287977969287315457"]:
return ujson.loads(NORMAL_TWEET)
elif tweet_id == "287977969287315458":