-
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_file
str - should be__file__
of the calling file -
registering_file_name
str - should be__name__
of the calling file -
cls
ClassVar[PluginBase] - the type of plugin to collect -
exclude_files
List[str] - any file to exclude from being collected as a plugin -
assert_one_per_source
bool - 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