From ccdb7340517687909c244fd0c4a3d7d734fe11e0 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 20 Aug 2025 17:00:42 +0100 Subject: [PATCH] lint --- tests/storage/controllers/test_persist_events.py | 12 ++++-------- tests/storage/test_events.py | 4 +--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/storage/controllers/test_persist_events.py b/tests/storage/controllers/test_persist_events.py index 59f0dea17c..ecc1f66f42 100644 --- a/tests/storage/controllers/test_persist_events.py +++ b/tests/storage/controllers/test_persist_events.py @@ -18,6 +18,7 @@ from tests.unittest import TestCase from synapse.storage.controllers.persist_events import find_predecessors + class FindPredecessorsTestCase(TestCase): def test_predecessors_finds_nothing_if_event_is_not_in_batch(self) -> None: batch = [ @@ -47,9 +48,7 @@ class FindPredecessorsTestCase(TestCase): (FakeEvent(event_id="G", prev_event_ids=[]), None), ] predecessors = find_predecessors({"A"}, batch) # type: ignore[arg-type] - self.assertEqual( - predecessors, {"A", "B", "C", "D", "E"} - ) + self.assertEqual(predecessors, {"A", "B", "C", "D", "E"}) def test_predecessors_ignores_cycles(self) -> None: batch = [ @@ -80,10 +79,7 @@ class FindPredecessorsTestCase(TestCase): (FakeEvent(event_id="G", prev_event_ids=[]), None), ] predecessors = find_predecessors({"A", "C"}, batch) # type: ignore[arg-type] - self.assertEqual( - predecessors, {"A", "B", "C", "D", "E"} - ) - + self.assertEqual(predecessors, {"A", "B", "C", "D", "E"}) @attr.s(auto_attribs=True) @@ -92,4 +88,4 @@ class FakeEvent: _prev_event_ids: List[str] def prev_event_ids(self) -> List[str]: - return self._prev_event_ids \ No newline at end of file + return self._prev_event_ids diff --git a/tests/storage/test_events.py b/tests/storage/test_events.py index 9aa52e579e..cf249311de 100644 --- a/tests/storage/test_events.py +++ b/tests/storage/test_events.py @@ -562,9 +562,7 @@ class AssignStitchedOrderingTestCase(HomeserverTestCase): context = self.get_success(self.state.compute_event_context(test_event)) self.get_success( - self._persistence._assign_stitched_orders( - room_id, [(test_event, context)] - ) + self._persistence._assign_stitched_orders(room_id, [(test_event, context)]) ) self.assertEqual(context.stitched_ordering, 6 * 2**16)