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, data=None, target_entity=None, name=None, label_type=None, settings=None, *args, **kwargs):
super().__init__(data=data, *args, **kwargs)
if label_type is not None:
error = 'label type must be "continuous" or "discrete"'
assert label_type in ['continuous', 'discrete'], error
self.settings = settings or {
'target_entity': target_entity,
'labeling_function': name,
'label_type': label_type,
'transforms': [],
}
self.plot = LabelPlots(self)