actions: Rename *topic local variables to *topic_name.

This is preparatory work towards adding a Topic model.
We plan to use the local variable name as 'topic' for
the Topic model objects.

Currently, we use *topic as the local variable name for
topic names.

We rename local variables of the form *topic to *topic_name
so that we don't need to think about type collisions in
individual code paths where we might want to talk about both
Topic objects and strings for the topic name.
This commit is contained in:
Prakhar Pratyush
2024-01-13 14:25:16 +05:30
committed by Tim Abbott
parent 7e1d0adb6e
commit 1eef052bd1
16 changed files with 103 additions and 99 deletions

View File

@@ -66,7 +66,7 @@ def check_send_typing_notification(sender: UserProfile, user_ids: List[int], ope
def do_send_stream_typing_notification(
sender: UserProfile, operator: str, stream: Stream, topic: str
sender: UserProfile, operator: str, stream: Stream, topic_name: str
) -> None:
sender_dict = {"user_id": sender.id, "email": sender.email}
@@ -76,7 +76,7 @@ def do_send_stream_typing_notification(
op=operator,
sender=sender_dict,
stream_id=stream.id,
topic=topic,
topic=topic_name,
)
# We don't notify long_term_idle subscribers.