From 04556f1a1b9c26f73ee0aabacac8e0ba542d6a65 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Sat, 23 Jan 2016 23:01:30 -0600 Subject: [PATCH] Build a Notifier instead of a Trie --- flake8/plugins/manager.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/flake8/plugins/manager.py b/flake8/plugins/manager.py index a80020e..8d5d12c 100644 --- a/flake8/plugins/manager.py +++ b/flake8/plugins/manager.py @@ -4,7 +4,7 @@ import logging import pkg_resources -from flake8 import _trie +from flake8 import notifier from flake8 import exceptions LOG = logging.getLogger(__name__) @@ -264,12 +264,19 @@ class Listeners(PluginTypeManager): namespace = 'flake8.listen' - def build_trie(self): - """Build a Trie for our Listeners.""" - trie = _trie.Trie() + def build_notifier(self): + """Build a Notifier for our Listeners. + + :returns: + Object to notify our listeners of certain error codes and + warnings. + :rtype: + :class:`~flake8.notifier.Notifier` + """ + notifier_trie = notifier.Notifier() for name in self.names: - trie.add(name, self.manager[name]) - return trie + notifier_trie.register_listener(name, self.manager[name]) + return notifier_trie class ReportFormatters(PluginTypeManager):