Last active
March 9, 2017 04:48
-
-
Save rbrady/d30ae640b19df658a17cd93827125678 to your computer and use it in GitHub Desktop.
Mistral Custom Actions ~ Using Mixins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
class Action(object): | |
@abc.abstractmethod | |
def run(self): | |
pass | |
class AsyncMixin(object): | |
def is_sync(self): | |
"""Returns False if the action is asynchronous, otherwise True.""" | |
return False | |
class ContextMixin(object): | |
def set_context(self, context): | |
self.context = context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment