Add in the ability for plugins to report their progress if applicable.

This commit is contained in:
Mike Auty
2018-03-23 15:41:55 +00:00
parent 470c139e81
commit 396dc8f8e4
2 changed files with 27 additions and 17 deletions
+3 -1
View File
@@ -40,8 +40,10 @@ class PluginInterface(interfaces_configuration.ConfigurableInterface, validity.V
def __init__(self,
context: 'interfaces.context.ContextInterface',
config_path: str) -> None:
config_path: str,
progress_callback: validity.ProgressCallback = None) -> None:
super().__init__(context, config_path)
self._progress_callback = progress_callback
# Plugins self validate on construction, it makes it more difficult to work with them, but then
# the validation doesn't need to be repeated over and over again by externals
if self.unsatisfied(context, config_path):