def deselect(self, mode, data):
        """Returns false if there was a data error when deselecting"""
        size = len(self.objects)

        if mode == 'None':
            return True

        elif mode == 'Mask':
            """ Deselect objects according to deselect mask """
            mask = data
            if len(mask) < size:
                # pad to the right
                mask = mask+[False]*(len(self.objects)-len(mask))

            self.logger.debug("Deselection Mask: {0}".format(mask))
            self.objects = [obj for (slct, obj) in filter(lambda slct_obj: not slct_obj[0], zip(mask, self.objects))]
            return size <= len(mask)

        elif mode == 'OneIndices':
            """ Deselect objects according to indexes """
            clean_data = list(filter(lambda i: i < size, data))
            self.objects = [self.objects[i] for i in range(len(self.objects)) if i not in clean_data]
            return len(clean_data) == len(data)

        elif mode == 'ZeroIndices':
            """ Deselect objects according to indexes """
            clean_data = list(filter(lambda i: i < size, data))
            self.objects = [self.objects[i] for i in clean_data]
            return len(clean_data) == len(data)

        else:
            return False
dataset/ETHPy150Open GraylinKim/sc2reader/sc2reader/factories/plugins/utils.py/UnitSelection.deselect/swapped operands of `<=`