typing: Fix wrong type annotations for mute_stream.

This is a part of djang-stubs refactorings.

Signed-off-by: Zixuan James Li <359101898@qq.com>
This commit is contained in:
Zixuan James Li
2022-05-30 11:46:05 -04:00
committed by Tim Abbott
parent 4cf3ba5744
commit d46f7566dd
2 changed files with 2 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ def get_recipient_id_for_stream_name(realm: Realm, stream_name: str) -> Optional
return stream.recipient.id if stream.recipient is not None else None
def mute_stream(realm: Realm, user_profile: str, stream_name: str) -> None:
def mute_stream(realm: Realm, user_profile: UserProfile, stream_name: str) -> None:
stream = get_stream(stream_name, realm)
recipient = stream.recipient
subscription = Subscription.objects.get(recipient=recipient, user_profile=user_profile)

View File

@@ -1408,7 +1408,7 @@ class PersonalMessagesFlagTest(ZulipTestCase):
class MarkUnreadTest(ZulipTestCase):
def mute_stream(self, stream_name: str, user: int) -> None:
def mute_stream(self, stream_name: str, user: UserProfile) -> None:
realm = get_realm("zulip")
stream = get_stream(stream_name, realm)
recipient = stream.recipient