From c5075be9aad88faa40265b566c559f8a5960e61d Mon Sep 17 00:00:00 2001 From: Zixuan James Li Date: Wed, 6 Jul 2022 00:58:43 -0400 Subject: [PATCH] test_retention: Add type annotation for expected_result Otherwise mypy infers the type of `expected_result` to be incompatible with the first argument of `fix_ordering_of_result`. Signed-off-by: Zixuan James Li --- zerver/tests/test_retention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/tests/test_retention.py b/zerver/tests/test_retention.py index cdfa40c394..8ad5c0488a 100644 --- a/zerver/tests/test_retention.py +++ b/zerver/tests/test_retention.py @@ -976,7 +976,7 @@ class TestGetRealmAndStreamsForArchiving(ZulipTestCase): # so we use a helper to order both structures in a consistent manner. This wouldn't be necessary # if python had a true "unordered list" data structure. Set doesn't do the job, because it requires # elements to be hashable. - expected_result = [ + expected_result: List[Tuple[Realm, List[Stream]]] = [ (zulip_realm, list(Stream.objects.filter(realm=zulip_realm).exclude(id=verona.id))), (zephyr_realm, [archiving_enabled_zephyr_stream]), (realm_all_streams_archiving_disabled, []),