Skip to content

Commit c78840f

Browse files
committed
kwargify ints
1 parent 954eb7a commit c78840f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

synapse/storage/databases/main/thread_subscriptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def get_max_thread_subscriptions_stream_id(self) -> int:
439439
return self._thread_subscriptions_id_gen.get_current_token()
440440

441441
async def get_updated_thread_subscriptions(
442-
self, from_id: int, to_id: int, limit: int
442+
self, *, from_id: int, to_id: int, limit: int
443443
) -> List[Tuple[int, str, str, str]]:
444444
"""Get updates to thread subscriptions between two stream IDs.
445445
@@ -472,7 +472,7 @@ def get_updated_thread_subscriptions_txn(
472472
)
473473

474474
async def get_updated_thread_subscriptions_for_user(
475-
self, user_id: str, from_id: int, to_id: int, limit: int
475+
self, user_id: str, *, from_id: int, to_id: int, limit: int
476476
) -> List[Tuple[int, str, str]]:
477477
"""Get updates to thread subscriptions for a specific user.
478478

tests/storage/test_thread_subscriptions.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,17 @@ def test_get_updated_thread_subscriptions(self) -> None:
240240

241241
# Get updates since initial ID (should include both changes)
242242
updates = self.get_success(
243-
self.store.get_updated_thread_subscriptions(0, stream_id2, 10)
243+
self.store.get_updated_thread_subscriptions(
244+
from_id=0, to_id=stream_id2, limit=10
245+
)
244246
)
245247
self.assertEqual(len(updates), 2)
246248

247249
# Get updates since first change (should include only the second change)
248250
updates = self.get_success(
249-
self.store.get_updated_thread_subscriptions(stream_id1, stream_id2, 10)
251+
self.store.get_updated_thread_subscriptions(
252+
from_id=stream_id1, to_id=stream_id2, limit=10
253+
)
250254
)
251255
self.assertEqual(
252256
updates,
@@ -278,15 +282,15 @@ def test_get_updated_thread_subscriptions_for_user(self) -> None:
278282
# Get updates for main user
279283
updates = self.get_success(
280284
self.store.get_updated_thread_subscriptions_for_user(
281-
self.user_id, 0, stream_id2, 10
285+
self.user_id, from_id=0, to_id=stream_id2, limit=10
282286
)
283287
)
284288
self.assertEqual(updates, [(stream_id1, self.room_id, self.thread_root_id)])
285289

286290
# Get updates for other user
287291
updates = self.get_success(
288292
self.store.get_updated_thread_subscriptions_for_user(
289-
other_user_id, 0, max(stream_id1, stream_id2), 10
293+
other_user_id, from_id=0, to_id=max(stream_id1, stream_id2), limit=10
290294
)
291295
)
292296
self.assertEqual(

0 commit comments

Comments
 (0)