Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def wrapper(executor, pipeline, input, state):
"""Run, evaluate, or execute a pipeline."""
if isinstance(input, tuple):
future = (Future(), Future())
for fu, v in zip(future, input):
fu.set_result(v)
else:
future = Future()
future.set_result(input)
state_monad = KleisliArrow.runKleisli(pipeline, future)
return f(state_monad, WrappedState(executor, state))
return wrapper
def wrapper(pipeline, input, state):
"""Run, evaluate, or execute a pipeline."""
state_monad = KleisliArrow.runKleisli(pipeline, input)
return f(state_monad, state)
return wrapper