diff --git a/zerver/lib/users.py b/zerver/lib/users.py index b1e78660c8..c1a845bb7a 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: str realm_id: int full_name: str avatar: 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.py index 487fc86056..46bfa3c5c5 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_image from zerver.lib.user_groups import get_system_user_group_for_user from 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.realm if (