mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
zproject: Use python 3 syntax for typing.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user