summary refs log tree commit diff
path: root/synapse/util/templates.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/util/templates.py')
-rw-r--r--synapse/util/templates.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/util/templates.py b/synapse/util/templates.py
index 38543dd1ea..eb3c8c9370 100644
--- a/synapse/util/templates.py
+++ b/synapse/util/templates.py
@@ -16,7 +16,7 @@
 
 import time
 import urllib.parse
-from typing import TYPE_CHECKING, Callable, Iterable, Optional, Union
+from typing import TYPE_CHECKING, Callable, Optional, Sequence, Union
 
 import jinja2
 
@@ -25,9 +25,9 @@ if TYPE_CHECKING:
 
 
 def build_jinja_env(
-    template_search_directories: Iterable[str],
+    template_search_directories: Sequence[str],
     config: "HomeServerConfig",
-    autoescape: Union[bool, Callable[[str], bool], None] = None,
+    autoescape: Union[bool, Callable[[Optional[str]], bool], None] = None,
 ) -> jinja2.Environment:
     """Set up a Jinja2 environment to load templates from the given search path
 
@@ -110,5 +110,5 @@ def _create_mxc_to_http_filter(
     return mxc_to_http_filter
 
 
-def _format_ts_filter(value: int, format: str):
+def _format_ts_filter(value: int, format: str) -> str:
     return time.strftime(format, time.localtime(value / 1000))