zerver/lib/notifications.py: Add hints for mypy.

Add type hints for mypy using isinstance in assert and if.
This commit is contained in:
Eklavya Sharma 2016-07-05 00:19:32 +05:30 committed by Tim Abbott
parent 98db1d996f
commit 9d2a539aaa
2 changed files with 1 additions and 2 deletions

View File

@ -42,7 +42,6 @@ exclude_py2 = []
exclude_py3 = """
zerver/lib/actions.py
zerver/lib/ccache.py
zerver/lib/notifications.py
zerver/lib/tornado_ioloop_logging.py
zerver/management/commands/create_stream.py
zerver/management/commands/email-mirror.py

View File

@ -53,7 +53,7 @@ def hashchange_encode(string):
# frontend.
# `safe` has a default value of "/", but we want those encoded, too.
return urllib.parse.quote(
string.encode("utf-8"), safe="").replace(".", "%2E").replace("%", ".")
string.encode("utf-8"), safe=b"").replace(".", "%2E").replace("%", ".")
def pm_narrow_url(participants):
# type: (List[text_type]) -> text_type