summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-10-01 08:09:18 -0400
committerGitHub <noreply@github.com>2020-10-01 08:09:18 -0400
commit4ff0201e6235b8b2efc5ce5a7dc3c479ea96df53 (patch)
tree632703075ef78aac894ac884f6fe722ec0b8784a /synapse/push
parentAdd prometheus metrics to track federation delays (#8430) (diff)
downloadsynapse-4ff0201e6235b8b2efc5ce5a7dc3c479ea96df53.tar.xz
Enable mypy checking for unreachable code and fix instances. (#8432)
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/push_rule_evaluator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py
index 709ace01e5..3a68ce636f 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -16,7 +16,7 @@
 
 import logging
 import re
-from typing import Any, Dict, List, Pattern, Union
+from typing import Any, Dict, List, Optional, Pattern, Union
 
 from synapse.events import EventBase
 from synapse.types import UserID
@@ -181,7 +181,7 @@ class PushRuleEvaluatorForEvent:
 
         return r.search(body)
 
-    def _get_value(self, dotted_key: str) -> str:
+    def _get_value(self, dotted_key: str) -> Optional[str]:
         return self._value_cache.get(dotted_key, None)