Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Doc new instance variables
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Mar 30, 2017
1 parent eefd9fe commit 6194a64
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion synapse/util/caches/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def __init__(self, orig, num_args, inlineCallbacks, cache_context=False):

arg_spec = inspect.getargspec(orig)
all_args = arg_spec.args
self.arg_spec = arg_spec

if "cache_context" in all_args:
if not cache_context:
Expand Down Expand Up @@ -225,8 +224,16 @@ def __init__(self, orig, num_args, inlineCallbacks, cache_context=False):
)

self.num_args = num_args

# list of the names of the args used as the cache key
self.arg_names = all_args[1:num_args + 1]

# The arg spec of the wrapped function, see `inspect.getargspec` for
# the type.
self.arg_spec = arg_spec

# self.arg_defaults is a map of arg name to its default value for each
# argument that has a default value
if arg_spec.defaults:
self.arg_defaults = dict(zip(
all_args[-len(arg_spec.defaults):],
Expand Down

0 comments on commit 6194a64

Please sign in to comment.