Skip to content

Commit

Permalink
#89 - enum class for intercept points in plugin API
Browse files Browse the repository at this point in the history
  • Loading branch information
dotchetter committed Jan 7, 2024
1 parent 495e3b1 commit 5ecf68b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyttman/clients/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ class BaseClient(abc.ABC):
Baseclass for Clients, for interfacing
with users directly or through an API.
"""
class PluginIntercept(enum.StrEnum):
before_intents = "before_intents"
after_intents = "after_intents"
before_app = "before_app"
after_app = "after_app"

def __init__(self, *args, message_router: AbstractMessageRouter, **kwargs):
def __init__(self,
message_router: AbstractMessageRouter,
plugins: list[PyttmanPlugin],
**kwargs):
self.message_router = message_router
self.name = self.__class__.__name__
self.plugins = plugins

[setattr(self, k, v) for k, v in kwargs.items()]

Expand Down

0 comments on commit 5ecf68b

Please sign in to comment.