diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 4ce32d82f4..46cc0997f1 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -1,6 +1,6 @@ import logging from enum import Enum -from typing import TYPE_CHECKING, AbstractSet, Dict, Final, List, Optional, Tuple +from typing import TYPE_CHECKING, AbstractSet, Dict, Final, List, Optional, Set, Tuple import attr @@ -554,8 +554,8 @@ class SlidingSyncHandler: if is_user_in_room: joined_space_room_ids.add(space_room_id) - # Flatten the rooms in the spaces - space_child_room_ids = set() + # Flatten the child rooms in the spaces + space_child_room_ids: Set[str] = set() for space_room_id in joined_space_room_ids: space_child_events = ( await self.room_summary_handler._get_space_child_events( diff --git a/tests/handlers/test_sliding_sync.py b/tests/handlers/test_sliding_sync.py index e6789a62e1..3be9c49661 100644 --- a/tests/handlers/test_sliding_sync.py +++ b/tests/handlers/test_sliding_sync.py @@ -1,5 +1,5 @@ -from typing import List, Optional import logging +from typing import List, Optional from twisted.test.proto_helpers import MemoryReactor