This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1818import logging
1919from typing import (
2020 Any ,
21+ Awaitable ,
2122 Callable ,
2223 Dict ,
2324 Generic ,
@@ -354,7 +355,7 @@ class DeferredCacheListDescriptor(_CacheDescriptorBase):
354355
355356 def __init__ (
356357 self ,
357- orig : Callable [..., Any ],
358+ orig : Callable [..., Awaitable [ Dict ] ],
358359 cached_method_name : str ,
359360 list_name : str ,
360361 num_args : Optional [int ] = None ,
@@ -385,13 +386,13 @@ def __init__(
385386
386387 def __get__ (
387388 self , obj : Optional [Any ], objtype : Optional [Type ] = None
388- ) -> Callable [..., Any ]:
389+ ) -> Callable [..., "defer.Deferred[Dict[Hashable, Any]]" ]:
389390 cached_method = getattr (obj , self .cached_method_name )
390391 cache : DeferredCache [CacheKey , Any ] = cached_method .cache
391392 num_args = cached_method .num_args
392393
393394 @functools .wraps (self .orig )
394- def wrapped (* args : Any , ** kwargs : Any ) -> Any :
395+ def wrapped (* args : Any , ** kwargs : Any ) -> "defer.Deferred[Dict]" :
395396 # If we're passed a cache_context then we'll want to call its
396397 # invalidate() whenever we are invalidated
397398 invalidate_callback = kwargs .pop ("on_invalidate" , None )
You can’t perform that action at this time.
0 commit comments