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, controller, strategy):
self.controller = controller
self.strategy = strategy
self.retry = RetryStrategy()
def __init__(self, points):
"""Initialize the sampling scheme.
Args:
points: Points list or generator function.
"""
def point_generator():
"Generator wrapping the points list."
for point in points:
yield point
self.point_generator = point_generator()
self.retry = RetryStrategy()
def __init__(self, coroutine, rvalue=lambda r: r.value):
self.coroutine = coroutine
self.rvalue = rvalue
self.retry = RetryStrategy()
self.results = []
try:
logger.debug("Get first proposed batch from coroutine")
self.start_batch(next(self.coroutine))
except StopIteration:
pass