summary refs log tree commit diff
path: root/synapse/storage/databases/main/state.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-12-30 13:47:12 -0500
committerGitHub <noreply@github.com>2021-12-30 18:47:12 +0000
commitcbd82d0b2db069400b5d43373838817d8a0209e7 (patch)
tree5380e1b2c6ad6e112754f45d0d85274f7a8641e8 /synapse/storage/databases/main/state.py
parentAdd type hints to `synapse/storage/databases/main/events_bg_updates.py` (#11654) (diff)
downloadsynapse-cbd82d0b2db069400b5d43373838817d8a0209e7.tar.xz
Convert all namedtuples to attrs. (#11665)
To improve type hints throughout the code.
Diffstat (limited to 'synapse/storage/databases/main/state.py')
-rw-r--r--synapse/storage/databases/main/state.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/synapse/storage/databases/main/state.py b/synapse/storage/databases/main/state.py
index 4bc044fb16..7e5a6aae18 100644
--- a/synapse/storage/databases/main/state.py
+++ b/synapse/storage/databases/main/state.py
@@ -14,7 +14,6 @@
 # limitations under the License.
 import collections.abc
 import logging
-from collections import namedtuple
 from typing import TYPE_CHECKING, Iterable, Optional, Set
 
 from synapse.api.constants import EventTypes, Membership
@@ -43,19 +42,6 @@ logger = logging.getLogger(__name__)
 MAX_STATE_DELTA_HOPS = 100
 
 
-class _GetStateGroupDelta(
-    namedtuple("_GetStateGroupDelta", ("prev_group", "delta_ids"))
-):
-    """Return type of get_state_group_delta that implements __len__, which lets
-    us use the itrable flag when caching
-    """
-
-    __slots__ = []
-
-    def __len__(self):
-        return len(self.delta_ids) if self.delta_ids else 0
-
-
 # this inherits from EventsWorkerStore because it calls self.get_events
 class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
     """The parts of StateGroupStore that can be called from workers."""