Beispiel #1
0
    def __setup_plugin_storage(self, user_plugin_dir):
        # type: (str) -> None
        plugin_storage = plugin_loader.PluginLoader()
        plugin_storage.add_plugin_location([builtin, user_plugin_dir])

        found_plugins = plugin_storage.get_by_class(
            data_templates.TemplateDataPlugin)

        self.__found_plugins = found_plugins
Beispiel #2
0
 def __init__(self):
     self.__plugin_search = plugin_loader.PluginLoader()
     self.__plugin_search.add_plugin_location(likelihoods)
Beispiel #3
0
 def __init__(self):
     self.__loader = plugin_loader.PluginLoader()
     self.__storage = []
     self.__load_main_plugins()
     self.__load_option_plugins()
Beispiel #4
0
def _plugin_charger(optional_plugin_location):
    # type: (Opt[str]) -> None
    loader = plugin_loader.PluginLoader()
    loader.add_plugin_location(optional_plugin_location)
    loader.add_plugin_location({PyPWA.progs, PyPWA.builtin_plugins})
Beispiel #5
0
 def __init__(self):
     self.__plugin_storage = plugin_loader.PluginLoader()
     self.__found_prior = None  # type: Any
Beispiel #6
0
def test_can_load_non_existant_file():
    with pytest.raises(ImportError):
        loader = plugin_loader.PluginLoader()
        loader.add_plugin_location(DOES_NOT_EXIST)
Beispiel #7
0
def python_sheet_loader():
    loader = plugin_loader.PluginLoader()
    loader.add_plugin_location(EXAMPLE_SHEET)
    return loader
Beispiel #8
0
def test_plugin_loader_with_sets():
    loader = plugin_loader.PluginLoader()
    loader.add_plugin_location({builtin_plugins})
Beispiel #9
0
def plugin_loader_with_plugins():
    loader = plugin_loader.PluginLoader()
    loader.add_plugin_location([builtin_plugins, None])
    return loader.get_by_class(options.Plugin)
Beispiel #10
0
 def __init__(self):
     self.__loader = plugin_loader.PluginLoader()
     self.__loader.add_plugin_location(
         {PyPWA.builtin_plugins, PyPWA.progs, PyPWA.initializers})
     self.__index = 0
     self._check_for_updates()
Beispiel #11
0
def load_plugins():
    loader = plugin_loader.PluginLoader()
    loader.add_plugin_location([builtin_plugins, configurator])
    return loader.get_by_class(options.Plugin)
Beispiel #12
0
 def __init__(self, location, process_name, setup_name=None):
     # type: (str, str, Opt[str]) -> None
     loader = plugin_loader.PluginLoader()
     loader.add_plugin_location(location)
     self.__process_loader = _ProcessFunctionLoader(loader, process_name)
     self.__setup_loader = _SetupFunctionLoader(loader, setup_name)