mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	mypy: Refer to default_stream in if statement, allowing type inference.
This commit is contained in:
		
				
					committed by
					
						
						Greg Price
					
				
			
			
				
	
			
			
			
						parent
						
							982c0481d0
						
					
				
				
					commit
					24cc14c10d
				
			@@ -19,7 +19,7 @@ def _default_all_public_streams(user_profile, all_public_streams):
 | 
			
		||||
def _default_narrow(user_profile, narrow):
 | 
			
		||||
    # type: (UserProfile, Iterable[Sequence[Text]]) -> Iterable[Sequence[Text]]
 | 
			
		||||
    default_stream = user_profile.default_events_register_stream  # type: Optional[Stream]
 | 
			
		||||
    if not narrow and user_profile.default_events_register_stream is not None:
 | 
			
		||||
    if not narrow and default_stream is not None:
 | 
			
		||||
        narrow = [['stream', default_stream.name]]
 | 
			
		||||
    return narrow
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user