Pylint and cleanup

master
Tom Wilson 6 years ago
parent a50ddfc763
commit 7a7d2128a4

@ -35,6 +35,9 @@ class InterfaceFunction():
def __call__(self, *args, **kwargs):
return self.func(*args, **kwargs)
# TODO: Create tests to try and make a plugin subclass, and check exceptions to see if they
# suggest the correct abstractmethods
class Plugin(ABC):
@staticmethod
@ -105,6 +108,7 @@ def init_plugins(plugin_classes, plugin_configs, core_config):
for plugininterface in plugin_interfaces.values():
plugininterface.functions = plugin_functions
def _add_job(job_desc):
global _deferred_jobs
global _defer
@ -114,6 +118,7 @@ def _add_job(job_desc):
else:
_deferred_jobs.append(job_desc)
def _attach_hook(attachment):
global plugin_hooks
global _deferred_attachments
@ -233,7 +238,8 @@ def find_plugins(plugin_names, plugin_dir=None):
try:
# mod = importlib.import_module("shepherd.plugins." + plugin_name)
mod = importlib.import_module('.'+plugin_name, "shepherd.plugins")
#TODO - ModuleNotFoundError is also triggered here if the plugin has a dependancy that can't be found
# TODO - ModuleNotFoundError is also triggered here if the plugin has a dependancy
# that can't be found
except ModuleNotFoundError:
try:
if (plugin_dir is not None) and (plugin_dir != ""):

Loading…
Cancel
Save