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.

realm_settings: Tighten function signatures with generic QuerySet.

Zixuan James Li77b5c79aa2bc
diff --git a/zerver/actions/realm_settings.py b/zerver/actions/realm_settings.py
index d22e9d62425..8de623f4611 100644
--- a/zerver/actions/realm_settings.py
+++ b/zerver/actions/realm_settings.py
@@ -1,8 +1,9 @@
-from typing import Any, Dict, Literal, Optional, Sequence
+from typing import Any, Dict, Literal, Optional
import orjson
from django.conf import settings
from django.db import transaction
+from django.db.models.query import QuerySet
from django.utils.timezone import now as timezone_now
from confirmation.models import Confirmation, create_confirmation_link, generate_key
@@ -32,7 +33,7 @@ if settings.BILLING_ENABLED:
from corporate.lib.stripe import downgrade_now_without_creating_additional_invoices
-def active_humans_in_realm(realm: Realm) -> Sequence[UserProfile]:
+def active_humans_in_realm(realm: Realm) -> QuerySet[UserProfile]:
return UserProfile.objects.filter(realm=realm, is_active=True, is_bot=False)