From e9e47e27a1f85b2d4c9830abb52a91bcb8440015 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 30 Oct 2024 18:02:03 -0400 Subject: [PATCH] Refactor BasePlugin class to remove ABC inheritance and abstract method decorators --- simplemind/models.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/simplemind/models.py b/simplemind/models.py index 0327d46..ec9f173 100644 --- a/simplemind/models.py +++ b/simplemind/models.py @@ -22,33 +22,28 @@ class SMBaseModel(BaseModel): return str(self) -class BasePlugin(ABC): +class BasePlugin: """The base conversation plugin class.""" # Plugin metadata. meta: Dict[str, Any] = {} - # @abstractmethod def initialize_hook(self, conversation: "Conversation"): """Initialize a hook for the plugin.""" raise NotImplementedError - # @abstractmethod def cleanup_hook(self, conversation: "Conversation"): """Cleanup a hook for the plugin.""" raise NotImplementedError - # @abstractmethod def add_message_hook(self, conversation: "Conversation", message: "Message"): """Add a message hook for the plugin.""" raise NotImplementedError - # @abstractmethod def pre_send_hook(self, conversation: "Conversation"): """Pre-send hook for the plugin.""" raise NotImplementedError - # @abstractmethod def post_send_hook(self, conversation: "Conversation", response: "Message"): """Post-send hook for the plugin.""" raise NotImplementedError