zulip/zerver/actions
Zixuan James Li b210c22329 message_send: Extract ActiveUserDict for accurate typing.
django-stubs types the return type of query.values(...) as a TypedDict.
This makes Dict[str, Any] that we have been using incompatible with it.

We use TypeGuard to ensure that `service_bot_tuples` is correctly
inferred to be `Tuple[int, int]` instead of `Tuple[int, Optional[int]]`.
Given that `bot_type` is optional for `ActiveUserDict`, we need to
narrow `row` to `ActiveBotUserDict` to make sure that `bot_type` is
non-optional. An advantage of this approach is that no assertions or
type casts are needed.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-07-15 14:02:40 -07:00
..
__init__.py
alert_words.py actions: Split out zerver.actions.alert_words. 2022-04-14 17:14:31 -07:00
bots.py typing: Add none-checks for miscellaneous cases. 2022-05-31 09:43:55 -07:00
create_realm.py change_realm_subdomain: Support skipping the redirect. 2022-06-25 08:44:24 -07:00
create_user.py users: Always pass delivery_email in user's own object. 2022-05-04 12:52:43 -07:00
custom_profile_fields.py typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
default_streams.py typing: Broaden type annotations for QuerySet compatibility. 2022-07-07 11:27:42 -07:00
hotspots.py actions: Split out zerver.actions.hotspots. 2022-04-14 17:14:31 -07:00
invites.py typing: Apply trivial none-checks with assertions as necessary. 2022-06-23 19:25:48 -07:00
message_edit.py message_edit: Make propagate_mode optional. 2022-06-23 22:09:05 -07:00
message_flags.py message_flags: Filter msgs having (or not) the flag before updating. 2022-07-07 10:52:36 -07:00
message_send.py message_send: Extract ActiveUserDict for accurate typing. 2022-07-15 14:02:40 -07:00
muted_users.py actions: Split out zerver.actions.muted_users. 2022-04-14 17:14:36 -07:00
presence.py actions: Split out zerver.actions.presence. 2022-04-14 17:14:32 -07:00
reactions.py actions: Split out zerver.actions.reactions. 2022-04-14 17:14:35 -07:00
realm_domains.py realm_domains: Type QuerySet.values as RealmDomainDict. 2022-07-07 11:27:42 -07:00
realm_emoji.py actions: Split out zerver.actions.realm_emoji. 2022-04-14 17:14:31 -07:00
realm_export.py actions: Split out zerver.actions.realm_export. 2022-04-14 17:14:31 -07:00
realm_icon.py actions: Split out zerver.actions.realm_icon. 2022-04-14 17:14:31 -07:00
realm_linkifiers.py typing: Apply trivial fixes to adjust edge cases in typing. 2022-05-30 12:03:51 -07:00
realm_logo.py actions: Split out zerver.actions.realm_logo. 2022-04-14 17:14:31 -07:00
realm_playgrounds.py actions: Split out zerver.actions.realm_playgrounds. 2022-04-14 17:14:30 -07:00
realm_settings.py realm_settings: Tighten function signatures with generic QuerySet. 2022-07-07 11:28:13 -07:00
streams.py models: Remove "role" field from Subscription. 2022-07-13 17:07:44 -07:00
submessage.py actions: Split out zerver.actions.submessage. 2022-04-14 17:14:30 -07:00
typing.py actions: Split out zerver.actions.typing. 2022-04-14 17:14:30 -07:00
uploads.py do_delete_old_unclaimed_attachments: Consider ArchivedAttachment rows. 2022-06-02 17:32:23 -07:00
user_activity.py actions: Split out zerver.actions.user_activity. 2022-04-14 17:14:32 -07:00
user_groups.py user_groups: Rename subgroups parameter to direct_subgroup_ids. 2022-05-17 14:51:55 -07:00
user_settings.py actions: Split out zerver.actions.user_settings. 2022-04-14 17:14:34 -07:00
user_topics.py typing: Add none-checks for stream.recipient_id. 2022-06-23 19:25:48 -07:00
users.py do_delete_user: Clean up acting_user logic. 2022-04-15 15:55:21 -07:00
video_calls.py