

def add_filter(self, name, code, active=True, combined=False, on_exception=True, group_name=None, overwrite=False):
    ' Adds a filter.\n\n        :param str name: Name of the new filter.\n        :param list code: List of lines of code in the filter function.\n        :param bool active: Is the filter active?\n            Default: ``True``\n        :param bool on_exception: Should the filter return True on an\n            exception?\n            Default: ``True``\n        :param str group_name: Name of the group that the new filter belongs\n            to. If this is None, the filter will not belong to any group (root\n            level).\n            Default: None\n        :param bool overwrite: If ``True``, an existing filter with the same\n            name will be overwritten. If ``False`` and a filter with the\n            same name exists, a value error is raised. Default: ``False``\n        '
    self.add_item(self.Filter(code, self, active, combined, on_exception), name, group_name, overwrite)

dataset/ETHPy150Open rproepp/spykeviewer/spykeviewer/plugin_framework/filter_manager.py FilterManager.add_filter/original