summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-12 10:55:15 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2021-08-24 10:43:09 +0100
commitfc93fb9ddd27aae9052700073bb4ee5c83b66f56 (patch)
tree18a4acc6db157fba01d88568f30ed8d6d246fc41
parentFix up type checking and ENABLE THE FILE :) (diff)
downloadsynapse-fc93fb9ddd27aae9052700073bb4ee5c83b66f56.tar.xz
Switch to FrozenSet
-rw-r--r--synapse/storage/state.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 8c072886b2..2e7f0bd087 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -56,14 +56,15 @@ class StateFilter:
             appear in `types`.
     """
 
-    types = attr.ib(type=frozendict[str, Optional[Set[str]]])
+    types = attr.ib(type="frozendict[str, Optional[FrozenSet[str]]]")
     include_others = attr.ib(default=False, type=bool)
 
     def __attrs_post_init__(self):
         # If `include_others` is set we canonicalise the filter by removing
         # wildcards from the types dictionary
         if self.include_others:
-            self.types = frozendict(
+            # REVIEW: yucky
+            self.types = frozendict(  # type: ignore[misc] # read-only
                 {k: v for k, v in self.types.items() if v is not None}
             )