mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 03:53:50 +00:00 
			
		
		
		
	typing: Import ValuesQuerySet alias from django_stubs_ext.
This saves us from using a conditional import. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a4eaa770f0
						
					
				
				
					commit
					7fd8d77ce0
				
			| @@ -1,4 +1,6 @@ | ||||
| from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, TypedDict | ||||
| from typing import Dict, List, Optional, Set, Tuple, TypedDict | ||||
|  | ||||
| from django_stubs_ext import ValuesQuerySet | ||||
|  | ||||
| from zerver.lib.cache import ( | ||||
|     bulk_cached_fetch, | ||||
| @@ -10,9 +12,6 @@ from zerver.lib.cache import ( | ||||
| from zerver.lib.types import DisplayRecipientT, UserDisplayRecipient | ||||
| from zerver.models import Recipient, Stream, UserProfile, bulk_get_huddle_user_ids | ||||
|  | ||||
| if TYPE_CHECKING: | ||||
|     from django.db.models.query import _QuerySet as ValuesQuerySet | ||||
|  | ||||
| display_recipient_fields = [ | ||||
|     "id", | ||||
|     "email", | ||||
| @@ -101,7 +100,7 @@ def bulk_fetch_display_recipients( | ||||
|  | ||||
|     def stream_query_function( | ||||
|         recipient_ids: List[int], | ||||
|     ) -> "ValuesQuerySet[Stream, TinyStreamResult]": | ||||
|     ) -> ValuesQuerySet[Stream, TinyStreamResult]: | ||||
|         stream_ids = [ | ||||
|             recipient_id_to_type_pair_dict[recipient_id][1] for recipient_id in recipient_ids | ||||
|         ] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user