'Clear the snippets by mark them as cleared.
If trigger is None, it updates the value of clear priority
instead.'

def clear_snippets(self, priority, triggers):

    if (not triggers):
        if ((self._clear_priority is None) or (priority > self._clear_priority)):
            self._clear_priority = priority
    else:
        for trigger in triggers:
            if ((trigger not in self._cleared) or (priority > self._cleared[trigger])):
                self._cleared[trigger] = priority
