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

Commit

Permalink
Fix typechecks against twisted trunk (#13061)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jun 15, 2022
1 parent bd03332 commit a4ae140
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit a4ae140

Please sign in to comment.