Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def wrap(func):
hookimpl(tryfirst=tryfirst, trylast=trylast,
hookwrapper=hookwrapper)(func)
hc._add_hookimpl(HookImpl(None, "", func, func.example_impl))
return func
return wrap
def MC(self, 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, callertype, firstresult=False):
hookfuncs = []
for method in methods:
f = HookImpl(None, "", method, method.example_impl)
hookfuncs.append(f)
return callertype(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)
if '__multicall__' in f.argnames:
caller = _legacymulticall
return caller(hookfuncs, kwargs, firstresult=firstresult)
def wrap(func):
hookimpl(tryfirst=tryfirst, trylast=trylast,
hookwrapper=hookwrapper)(func)
hc._add_hookimpl(HookImpl(None, "", func, func.example_impl))
return func
return wrap