mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 20:13:46 +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
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							bc66eaee7d
						
					
				
				
					commit
					b7e56ccbdc
				
			| @@ -56,11 +56,11 @@ def check_stream_name(stream_name: str) -> None: | ||||
|         ) | ||||
|  | ||||
|  | ||||
| def check_stream_topic(topic: str) -> None: | ||||
|     if topic.strip() == "": | ||||
| def check_stream_topic(topic_name: str) -> None: | ||||
|     if topic_name.strip() == "": | ||||
|         raise JsonableError(_("Topic can't be empty!")) | ||||
|  | ||||
|     invalid_character_pos = check_string_is_printable(topic) | ||||
|     invalid_character_pos = check_string_is_printable(topic_name) | ||||
|     if invalid_character_pos is not None: | ||||
|         raise JsonableError( | ||||
|             _("Invalid character in topic, at position {position}!").format( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user