stop misusing __all__ for default plugin list

this fixes tests by renaming the list of default plugins
from __all__ (which has a special meaning) to a separate
list called PLUGINS

no need to put BasePlugin in __all__ after all
if we don't use __all__ at all
This commit is contained in:
nicoco
2023-02-23 06:32:17 +01:00
parent af07864cbb
commit 9b0be1ca2b
2 changed files with 11 additions and 4 deletions
+9 -2
View File
@@ -6,7 +6,7 @@ from slixmpp.plugins.base import PluginManager, PluginNotFound, BasePlugin
from slixmpp.plugins.base import register_plugin, load_plugin
__all__ = [
PLUGINS = [
# XEPS
'xep_0004', # Data Forms
'xep_0009', # Jabber-RPC
@@ -116,5 +116,12 @@ __all__ = [
'xep_0444', # Message Reactions
'xep_0461', # Message Replies
# Meant to be imported by plugins
'BasePlugin'
]
__all__ = PLUGINS + [
'PluginManager',
'PluginNotFound',
'BasePlugin',
'register_plugin',
'load_plugin',
]