mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
addressee: Clean up type ignores.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
@@ -1842,7 +1842,7 @@ def get_recipient_from_user_ids(recipient_profile_ids: Set[int],
|
||||
else:
|
||||
return get_personal_recipient(list(recipient_profile_ids)[0])
|
||||
|
||||
def validate_recipient_user_profiles(user_profiles: List[UserProfile],
|
||||
def validate_recipient_user_profiles(user_profiles: Sequence[UserProfile],
|
||||
sender: UserProfile,
|
||||
allow_deactivated: bool=False) -> Set[int]:
|
||||
recipient_profile_ids = set()
|
||||
@@ -1904,7 +1904,7 @@ def recipient_for_user_ids(user_ids: Iterable[int], sender: UserProfile) -> Reci
|
||||
sender=sender
|
||||
)
|
||||
|
||||
def recipient_for_user_profiles(user_profiles: List[UserProfile], forwarded_mirror_message: bool,
|
||||
def recipient_for_user_profiles(user_profiles: Sequence[UserProfile], forwarded_mirror_message: bool,
|
||||
forwarder_user_profile: Optional[UserProfile],
|
||||
sender: UserProfile, allow_deactivated: bool=False) -> Recipient:
|
||||
|
||||
|
||||
@@ -91,9 +91,10 @@ class Addressee:
|
||||
def is_private(self) -> bool:
|
||||
return self._msg_type == 'private'
|
||||
|
||||
def user_profiles(self) -> List[UserProfile]:
|
||||
def user_profiles(self) -> Sequence[UserProfile]:
|
||||
assert(self.is_private())
|
||||
return self._user_profiles # type: ignore # assertion protects us
|
||||
assert self._user_profiles is not None
|
||||
return self._user_profiles
|
||||
|
||||
def stream(self) -> Optional[Stream]:
|
||||
assert(self.is_stream())
|
||||
|
||||
Reference in New Issue
Block a user