summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
authorWill Hunt <willh@matrix.org>2021-07-20 09:35:03 +0100
committerWill Hunt <willh@matrix.org>2021-07-20 09:35:03 +0100
commitf19795355bf31af3842e607b3f1cc34e5d7727dc (patch)
tree85834d47d9f4610fcf70f176114aa17a7b61b8e4 /synapse/push/push_rule_evaluator.py
parentMerge remote-tracking branch 'origin/develop' into hs/hacked-together-event-c... (diff)
parentFactorise `get_datastore` calls in phone_stats_home. (#10427) (diff)
downloadsynapse-f19795355bf31af3842e607b3f1cc34e5d7727dc.tar.xz
Merge remote-tracking branch 'origin/develop' into hs/hacked-together-event-cache
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-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 98b90a4f51..7a8dc63976 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -195,9 +195,9 @@ class PushRuleEvaluatorForEvent:
 
 
 # Caches (string, is_glob, word_boundary) -> regex for push. See _glob_matches
-regex_cache = LruCache(
+regex_cache: LruCache[Tuple[str, bool, bool], Pattern] = LruCache(
     50000, "regex_push_cache"
-)  # type: LruCache[Tuple[str, bool, bool], Pattern]
+)
 
 
 def _glob_matches(glob: str, value: str, word_boundary: bool = False) -> bool: