(self, chip_index)
Remove a chip from the saved search.
Remove a chip from the saved search.
Remove a chip from the saved search .
def remove_chip(self, chip_index):
        """Remove a chip from the saved search."""
        chip_len = len(self._chips)
        if chip_index > (chip_len + 1):
            raise ValueError(
                f'Unable to remove chip, only {chip_len} chips stored '
                f'(no index {chip_index})')

        try:
            _ = self._chips.pop(chip_index)
        except IndexError as exc:
            raise ValueError(
                f'Unable to remove index {chip_index}, out of range') from exc

        self.commit()
def remove_chip ( self , chip_index ) : chip_len = len ( self . _chips ) if chip_index > ( chip_len + 1 ) : raise ValueError ( f'Unable to remove chip, only {chip_len} chips stored ' f'(no index {chip_index})' ) try : _ = self . _chips . pop ( chip_index ) except IndexError as exc : raise ValueError ( f'Unable to remove index {chip_index}, out of range' ) from exc self . commit ( )