mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
actions: Replace SizedTextIterable with standard Collection[str].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
48a52ac56e
commit
393ffcb318
@@ -11,6 +11,7 @@ from typing import (
|
|||||||
AbstractSet,
|
AbstractSet,
|
||||||
Any,
|
Any,
|
||||||
Callable,
|
Callable,
|
||||||
|
Collection,
|
||||||
Dict,
|
Dict,
|
||||||
Iterable,
|
Iterable,
|
||||||
List,
|
List,
|
||||||
@@ -260,9 +261,6 @@ class SubscriptionInfo:
|
|||||||
never_subscribed: List[Dict[str, Any]]
|
never_subscribed: List[Dict[str, Any]]
|
||||||
|
|
||||||
|
|
||||||
# This will be used to type annotate parameters in a function if the function
|
|
||||||
# works on both str and unicode in python 2 but in python 3 it only works on str.
|
|
||||||
SizedTextIterable = Union[Sequence[str], AbstractSet[str]]
|
|
||||||
ONBOARDING_TOTAL_MESSAGES = 1000
|
ONBOARDING_TOTAL_MESSAGES = 1000
|
||||||
ONBOARDING_UNREAD_MESSAGES = 20
|
ONBOARDING_UNREAD_MESSAGES = 20
|
||||||
|
|
||||||
@@ -6343,7 +6341,7 @@ def check_invite_limit(realm: Realm, num_invitees: int) -> None:
|
|||||||
|
|
||||||
def do_invite_users(
|
def do_invite_users(
|
||||||
user_profile: UserProfile,
|
user_profile: UserProfile,
|
||||||
invitee_emails: SizedTextIterable,
|
invitee_emails: Collection[str],
|
||||||
streams: Iterable[Stream],
|
streams: Iterable[Stream],
|
||||||
invite_as: int = PreregistrationUser.INVITE_AS["MEMBER"],
|
invite_as: int = PreregistrationUser.INVITE_AS["MEMBER"],
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user