Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix typechecks against twisted trunk #13061

Merged
merged 3 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13061.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix type checking errors against Twisted trunk.
8 changes: 4 additions & 4 deletions tests/handlers/test_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_rejected_message_event_state(self) -> None:
join_event = self._build_and_send_join_event(OTHER_SERVER, OTHER_USER, room_id)

# check the state group
sg = self.successResultOf(
sg = self.get_success(
self.store._get_state_group_for_event(join_event.event_id)
)

Expand Down Expand Up @@ -149,7 +149,7 @@ def test_rejected_message_event_state(self) -> None:
self.assertIsNotNone(e.rejected_reason)

# ... and the state group should be the same as before
sg2 = self.successResultOf(self.store._get_state_group_for_event(ev.event_id))
sg2 = self.get_success(self.store._get_state_group_for_event(ev.event_id))

self.assertEqual(sg, sg2)

Expand All @@ -172,7 +172,7 @@ def test_rejected_state_event_state(self) -> None:
join_event = self._build_and_send_join_event(OTHER_SERVER, OTHER_USER, room_id)

# check the state group
sg = self.successResultOf(
sg = self.get_success(
self.store._get_state_group_for_event(join_event.event_id)
)

Expand Down Expand Up @@ -203,7 +203,7 @@ def test_rejected_state_event_state(self) -> None:
self.assertIsNotNone(e.rejected_reason)

# ... and the state group should be the same as before
sg2 = self.successResultOf(self.store._get_state_group_for_event(ev.event_id))
sg2 = self.get_success(self.store._get_state_group_for_event(ev.event_id))

self.assertEqual(sg, sg2)

Expand Down
1 change: 1 addition & 0 deletions tests/state/test_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def do_check(

prev_events = list(graph[node_id])

state_before: StateMap[str]
if len(prev_events) == 0:
state_before = {}
elif len(prev_events) == 1:
Expand Down