mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
lib: 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:
committed by
Tim Abbott
parent
bc66eaee7d
commit
b7e56ccbdc
@@ -272,8 +272,8 @@ def build_get_topic_visibility_policy(
|
||||
visibility_policy = row["visibility_policy"]
|
||||
topic_to_visibility_policy[(recipient_id, topic_name)] = visibility_policy
|
||||
|
||||
def get_topic_visibility_policy(recipient_id: int, topic: str) -> int:
|
||||
return topic_to_visibility_policy[(recipient_id, topic.lower())]
|
||||
def get_topic_visibility_policy(recipient_id: int, topic_name: str) -> int:
|
||||
return topic_to_visibility_policy[(recipient_id, topic_name.lower())]
|
||||
|
||||
return get_topic_visibility_policy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user