summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-08-12 14:29:17 +0100
committerMark Haines <mark.haines@matrix.org>2015-08-12 14:29:17 +0100
commitde3b7b55d68ebad3d535dad2643e747460dc22a3 (patch)
tree117adac0abcc4a2de49c250b2430a1b38d4284c6 /synapse
parentAdd config option for setting the list of thumbnail sizes to precalculate (diff)
downloadsynapse-de3b7b55d68ebad3d535dad2643e747460dc22a3.tar.xz
Doc-string for config ultility function
Diffstat (limited to '')
-rw-r--r--synapse/config/repository.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index 7cab874422..2cb0812d7d 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -21,6 +21,17 @@ ThumbnailRequirement = namedtuple(
 )
 
 def parse_thumbnail_requirements(thumbnail_sizes):
+    """ Takes a list of dictionaries with "width", "height", and "method" keys
+    and creates a map from image media types to the thumbnail size, thumnailing
+    method, and thumbnail media type to precalculate
+
+    Args:
+        thumbnail_sizes(list): List of dicts with "width", "height", and
+            "method" keys
+    Returns:
+        Dictionary mapping from media type string to list of
+        ThumbnailRequirement tuples.
+    """
     requirements = {}
     for size in thumbnail_sizes:
         width = size["width"]