Skip to content

Commit

Permalink
Better docstring for Component
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Nov 23, 2023
1 parent 54659cb commit dce6421
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ctapipe/core/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dce6421

Please sign in to comment.