Commit 9230a832 authored by Guillaume Binet's avatar Guillaume Binet

Precompute plugins_callback_order

parent dec8ea3b
......@@ -167,7 +167,11 @@ class BotPluginManager(StoreMixin):
self.autoinstall_deps = autoinstall_deps
self.extra = extra
self.core_plugins = core_plugins
# Make sure there is a 'None' entry in the callback order, to include
# any plugin not explicitly ordered.
self.plugins_callback_order = plugins_callback_order
if None not in self.plugins_callback_order:
self.plugins_callback_order += (None,)
self.repo_manager = repo_manager
self.plugin_infos: Dict[str, PluginInfo] = {}
self.plugins: Dict[str, BotPlugin] = {}
......@@ -286,10 +290,6 @@ class BotPluginManager(StoreMixin):
def get_all_active_plugins(self) -> List[BotPlugin]:
"""This returns the list of plugins in the callback ordered defined from the config."""
# Make sure there is a 'None' entry in the callback order, to include
# any plugin not explicitly ordered.
if None not in self.plugins_callback_order:
self.plugins_callback_order = self.plugins_callback_order + (None,)
all_plugins = []
for name in self.plugins_callback_order:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment