pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
123 stars 60 forks source link

refactor plugin validation #386

Open hannesdelbeke opened 2 years ago

hannesdelbeke commented 2 years ago

move duplicate code regarding plugin validation, from plugins_from_module and register_plugin, into plugin_is_valid

refactor only no new code.

swapped continue -> return False raise Exception -> return False

depending on where plugin_is_valid is used we then raise an exception or debug log anyway, so logic remains same.

now there's no more dupe code for plugin validation, and it's all in the place where we expect it: the plugin_is_valid function

hannesdelbeke commented 2 years ago

this should be ready for merge if we are happy with this