From 6b241b525787ff1054955acee783193598a017fd Mon Sep 17 00:00:00 2001 From: Carlo Fuselli Date: Wed, 15 May 2024 09:03:35 +0200 Subject: [PATCH] Update register_all Change needed in case of plugins that inherit from other plugins. The parent class would be registered once more after the plugin, basically cancelling the registration of the desired plugin. --- strax/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/strax/context.py b/strax/context.py index e0c0e3a3..f9b87f03 100644 --- a/strax/context.py +++ b/strax/context.py @@ -578,7 +578,8 @@ def register_all(self, module): if not isinstance(x, type(type)): continue if issubclass(x, strax.Plugin): - self.register(x) + if x.__module__ == module.__name__: # Ensure it's defined in the given module + self.register(x) def register_cut_list(self, cut_list): """Register cut lists to strax context.