Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
users: Fix TypedDict name for get_accounts_for_email return.
Anders Kaseorgc419c6369e03
diff --git a/zerver/lib/users.py b/zerver/lib/users.pyindex b1e78660c85..c1a845bb7aa 100644--- a/zerver/lib/users.py+++ b/zerver/lib/users.py@@ -289,14 +289,14 @@ def access_user_by_email(return access_user_common(target, user_profile, allow_deactivated, allow_bots, for_admin)-class Accounts(TypedDict):+class Account(TypedDict):realm_name: strrealm_id: intfull_name: stravatar: Optional[str]-def get_accounts_for_email(email: str) -> List[Accounts]:+def get_accounts_for_email(email: str) -> List[Account]:profiles = (UserProfile.objects.select_related("realm").filter(@@ -307,7 +307,7 @@ def get_accounts_for_email(email: str) -> List[Accounts]:).order_by("date_joined"))- accounts: List[Accounts] = []+ accounts: List[Account] = []for profile in profiles:accounts.append(dict(diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.pyindex 487fc860564..46bfa3c5c55 100644--- a/zerver/tests/test_users.py+++ b/zerver/tests/test_users.py@@ -49,7 +49,7 @@ from zerver.lib.test_helpers import (from zerver.lib.upload import upload_avatar_imagefrom zerver.lib.user_groups import get_system_user_group_for_userfrom zerver.lib.users import (- Accounts,+ Account,access_user_by_id,get_accounts_for_email,get_cross_realm_dicts,@@ -1110,7 +1110,7 @@ class UserProfileTest(ZulipTestCase):def test_get_accounts_for_email(self) -> None:reset_email_visibility_to_everyone_in_zulip_realm()- def check_account_present_in_accounts(user: UserProfile, accounts: List[Accounts]) -> None:+ def check_account_present_in_accounts(user: UserProfile, accounts: List[Account]) -> None:for account in accounts:realm = user.realmif (