zproject: Use python 3 syntax for typing.

This commit is contained in:
rht
2017-10-27 13:03:15 +02:00
committed by Tim Abbott
parent 77f32a1e0c
commit 26b6b893e6
5 changed files with 6 additions and 12 deletions

View File

@@ -13,8 +13,7 @@ from .compressors import minified_js
from zerver.templatetags.app_filters import display_list, render_markdown_path
def environment(**options):
# type: (**Any) -> Environment
def environment(**options: Any) -> Environment:
env = Environment(**options)
env.globals.update({
'static': staticfiles_storage.url,

View File

@@ -10,8 +10,7 @@ from django.template import TemplateSyntaxError
from zerver.templatetags.minified_js import MinifiedJSNode
def minified_js(sourcefile):
# type: (str) -> Text
def minified_js(sourcefile: str) -> Text:
if sourcefile not in settings.JS_SPECS:
raise TemplateSyntaxError(
"Invalid argument: no JS file %s".format(sourcefile))