mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Type annotation of zerver/models.py
[Substantially revised by tabbott] This probably still has some bugs in it, but having mostly complete annotations for models.py will help a lot for the annotations folks are adding to other files.
This commit is contained in:
@@ -202,7 +202,7 @@ def generic_bulk_cached_fetch(cache_key_function, query_function, object_ids,
|
||||
setter=lambda obj: obj,
|
||||
id_fetcher=lambda obj: obj.id,
|
||||
cache_transformer=lambda obj: obj):
|
||||
# type: (Callable[[Any], str], Callable[[List[int]], List[Any]], List[Any], Callable[[Any], Any], Callable[[Any], Any], Callable[[Any], Any], Callable[[Any], Any]) -> Dict[int, Any]
|
||||
# type: (Callable[[Any], str], Callable[[List[Any]], List[Any]], List[Any], Callable[[Any], Any], Callable[[Any], Any], Callable[[Any], Any], Callable[[Any], Any]) -> Dict[Any, Any]
|
||||
cache_keys = {} # type: Dict[int, str]
|
||||
for object_id in object_ids:
|
||||
cache_keys[object_id] = cache_key_function(object_id)
|
||||
|
||||
Reference in New Issue
Block a user