From dce64217601e870698eb0b2728f77085efd15fcc Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Thu, 23 Nov 2023 12:28:03 +0100 Subject: [PATCH] Better docstring for Component --- ctapipe/core/component.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ctapipe/core/component.py b/ctapipe/core/component.py index 71c1de06b6d..1a7707f3b15 100644 --- a/ctapipe/core/component.py +++ b/ctapipe/core/component.py @@ -201,8 +201,16 @@ def from_name(cls, name, config=None, parent=None, **kwargs): @classmethod def non_abstract_subclasses(cls): """ - get dict{name: cls} of non abstract subclasses, - subclasses can possibly be defined in plugins + Get a dict of all non-abstract subclasses of this class. + + This method is using the entry-point plugin system + to also check for registered plugin implementations. + + Returns + ------- + subclasses : dict[str, type] + A dict mapping the name to the class of all found, + non-abstract subclasses of this class. """ if hasattr(cls, "plugin_entry_point"): detect_and_import_plugins(cls.plugin_entry_point)