def __init__(self, procedure, needed, data, send_task, worker): self.procedure = procedure self.needed = needed self.has_kwargs = has_kwargs(needed) if needed else False self.data = data self.worker = worker self.send_task = send_task
def _has_kwargs(self): """Check if the arguments defined by the attribute needed has kwargs""" return has_kwargs(self.needed)