From b0cec2edbd83bae427779f5949af3c2323b0932c Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 15 Feb 2014 23:56:39 +0100 Subject: [PATCH] Removed a unnecessary property. --- pythonx/UltiSnips/providers/_snippet_dictionary.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pythonx/UltiSnips/providers/_snippet_dictionary.py b/pythonx/UltiSnips/providers/_snippet_dictionary.py index add7fc0..a74be8b 100644 --- a/pythonx/UltiSnips/providers/_snippet_dictionary.py +++ b/pythonx/UltiSnips/providers/_snippet_dictionary.py @@ -35,15 +35,11 @@ class SnippetDictionary(object): def get_matching_snippets(self, trigger, potentially): """Returns all snippets matching the given trigger. If 'potentially' is true, returns all that could_match().""" + all_snippets = self._added + self._snippets if not potentially: - return [s for s in self.snippets if s.matches(trigger)] + return [s for s in all_snippets if s.matches(trigger)] else: - return [s for s in self.snippets if s.could_match(trigger)] - - @property - def snippets(self): - """Returns all snippets in this dictionary.""" - return self._added + self._snippets + return [s for s in all_snippets if s.could_match(trigger)] def clear_snippets(self, triggers=None): """Remove all snippets that match each trigger in 'triggers'. When