Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

mypy: Fix return type for num_push_devices_for_user.

Tim Abbottbd134019e4a6
diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.py
index bbfd039b091..b3bbedbd609 100644
--- a/zerver/lib/push_notifications.py
+++ b/zerver/lib/push_notifications.py
@@ -419,9 +419,7 @@ def send_notifications_to_bouncer(
#
-def num_push_devices_for_user(
- user_profile: UserProfile, kind: Optional[int] = None
-) -> PushDeviceToken:
+def num_push_devices_for_user(user_profile: UserProfile, kind: Optional[int] = None) -> int:
if kind is None:
return PushDeviceToken.objects.filter(user=user_profile).count()
else: