MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / call

Method call

python/graphvite/util.py:169–187  ·  view source on GitHub ↗

Monitor the arguments of a function. Parameters: function (function): function to monitor Returns: function: wrapped function

(self, function)

Source from the content-addressed store, hash-verified

167 return wrapper
168
169 def call(self, function):
170 """
171 Monitor the arguments of a function.
172
173 Parameters:
174 function (function): function to monitor
175
176 Returns:
177 function: wrapped function
178 """
179 @wraps(function)
180 def wrapper(*args, **kwargs):
181 name = self.get_name(function, args[0])
182 strings = ["%s" % repr(arg) for arg in args]
183 strings += ["%s=%s" % (k, repr(v)) for k, v in kwargs.items()]
184 logger.info("[call] %s(%s)" % (name, ", ".join(strings)))
185 return function(*args, **kwargs)
186
187 return wrapper
188
189 def result(self, function):
190 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected