-
Notifications
You must be signed in to change notification settings - Fork 1
sd_utils.plugins.plugin_collector
pencil-pusher edited this page Jul 15, 2021
·
3 revisions
collect_plugins(registering_file: str, registering_file_name: str, cls: ClassVar[PluginBase] = PluginBase, exclude_files: List[str] = [], assert_one_per_source: bool = True) -> List[str]collects all the plugins of a given type in the given directory then returns the list of plugins processed
Arguments:
-
registering_filestr - should be__file__of the calling file -
registering_file_namestr - should be__name__of the calling file -
clsClassVar[PluginBase] - the type of plugin to collect -
exclude_filesList[str] - any file to exclude from being collected as a plugin -
assert_one_per_sourcebool - asserts that only 1 plugin may be defined in each source file
Returns:
-
List[str]- a list of all the plugin files collected. should be stored in the calling files__all__variable