Skip to content

Commit

Permalink
Revert "feat: clean up the Plugin ABC"
Browse files Browse the repository at this point in the history
This reverts commit 3e5ff9b.

We can't do this without changing how the plugins handle request_func
since @abstractmethods must be implemented not assigned.
  • Loading branch information
sjmonson committed Sep 27, 2024
1 parent 871ad09 commit a924bc5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions plugins/plugin.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from abc import ABC, abstractmethod
class Plugin:
def __init__(self, args):
self.args = args

from result import RequestResult
def request_http(self, query, user_id):
pass

def streaming_request_http(self, query, user_id):
pass

class Plugin(ABC):
def __init__(self, args):
self.args = args
def request_grpc(self, query, user_id):
pass

@abstractmethod
def request_func(self, query: dict, user_id: int, test_end_time: float) -> RequestResult:
def streaming_request_grpc(self, query, user_id):
pass

0 comments on commit a924bc5

Please sign in to comment.