summary refs log tree commit diff
path: root/synapse/rest/client/v1/push_rule.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-23 13:28:00 +0000
committerDavid Baker <dave@matrix.org>2015-01-23 13:28:00 +0000
commitb3f66ea6fb5871d7eeb71b466740adb61a89c0d2 (patch)
treec20d1eae13281a738592cd81f82ef30d54581868 /synapse/rest/client/v1/push_rule.py
parentMake string format tuple an actual tuple (diff)
downloadsynapse-b3f66ea6fb5871d7eeb71b466740adb61a89c0d2.tar.xz
more pep8
Diffstat (limited to 'synapse/rest/client/v1/push_rule.py')
-rw-r--r--synapse/rest/client/v1/push_rule.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index 35ffcba3df..ce2f0febf4 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -249,7 +249,6 @@ class PushRuleRestServlet(RestServlet):
         else:
             raise UnrecognizedRequestError()
 
-
     def on_OPTIONS(self, _):
         return 200, {}
 
@@ -259,6 +258,7 @@ def _add_empty_priority_class_arrays(d):
         d[pc] = []
     return d
 
+
 def _instance_handle_from_conditions(conditions):
     """
     Given a list of conditions, return the instance handle of the
@@ -289,6 +289,7 @@ def _filter_ruleset_with_path(ruleset, path):
             return r
     raise NotFoundError
 
+
 def _priority_class_to_template_name(pc):
     if pc > PushRuleRestServlet.PRIORITY_CLASS_MAP['override']:
         # per-device
@@ -297,12 +298,13 @@ def _priority_class_to_template_name(pc):
     else:
         return PushRuleRestServlet.PRIORITY_CLASS_INVERSE_MAP[pc]
 
+
 def _rule_to_template(rule):
     template_name = _priority_class_to_template_name(rule['priority_class'])
     if template_name in ['override', 'underride']:
         return {k:rule[k] for k in ["rule_id", "conditions", "actions"]}
     elif template_name in ["sender", "room"]:
-        return {k:rule[k] for k in ["rule_id", "actions"]}
+        return {k: rule[k] for k in ["rule_id", "actions"]}
     elif template_name == 'content':
         if len(rule["conditions"]) != 1:
             return None