Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, name, hook_execute, specmodule_or_class=None, spec_opts=None):
self.name = name
self._wrappers = []
self._nonwrappers = []
self._hookexec = hook_execute
self.argnames = None
self.kwargnames = None
self.multicall = _multicall
self.spec = None
if specmodule_or_class is not None:
assert spec_opts is not None
self.set_specification(specmodule_or_class, spec_opts)
def MC(methods, kwargs, firstresult=False):
hookfuncs = []
for method in methods:
f = HookImpl(None, "", method, method.example_impl)
hookfuncs.append(f)
return _multicall(hookfuncs, kwargs, firstresult=firstresult)
def MC(methods, kwargs, firstresult=False):
caller = _multicall
hookfuncs = []
for method in methods:
f = HookImpl(None, "", method, method.example_impl)
hookfuncs.append(f)
return caller("foo", hookfuncs, kwargs, firstresult)