Raise exception so we don't run into this arg mismatch again
This commit is contained in:
@@ -431,6 +431,12 @@ class DeferredCacheListDescriptor(_CacheDescriptorBase):
|
||||
cache: DeferredCache[CacheKey, Any] = cached_method.cache
|
||||
num_args = cached_method.num_args
|
||||
|
||||
if num_args != self.num_args:
|
||||
raise Exception(
|
||||
"Number of args (%s) does not match underlying cache_method_name=%s (%s)."
|
||||
% (self.num_args, self.cached_method_name, num_args)
|
||||
)
|
||||
|
||||
@functools.wraps(self.orig)
|
||||
def wrapped(*args: Any, **kwargs: Any) -> "defer.Deferred[Dict]":
|
||||
# If we're passed a cache_context then we'll want to call its
|
||||
|
||||
Reference in New Issue
Block a user