Class decorator that registers the class as a plugin.
Although not it's not necessary that plugins inherit from Plugin, they need to implement the same methods.
@plugin('myplugin')
class MyPlugin(Plugin):
@classmethod
def add_options(cls, parser):
'''Optional
Used to add custom command line options.
@note: Must be a static method.
'''
pass
def setup(self, ctx:SetupContext):
'''Optional
Called during setup step
'''
pass
def run(self, ctx:RunContext):
'''Optional
Called during run
'''
pass
def teardown(self, ctx:TeardownContext):
'''Optional
Called during teardown
'''
pass