33 lines
551 B
Python
33 lines
551 B
Python
from typing import Dict
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class AbstractCommand(ABC):
|
|
|
|
@abstractmethod
|
|
def execute(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def describe(self) -> dict:
|
|
pass
|
|
|
|
|
|
class AbstractCommandCompiler(ABC):
|
|
|
|
@abstractmethod
|
|
def compile(self, *args, **kwargs) -> AbstractCommand:
|
|
pass
|
|
|
|
|
|
class AbstractPlugin(ABC):
|
|
plugin_name = ""
|
|
|
|
@abstractmethod
|
|
def load_compilers(self) -> Dict[str, AbstractCommandCompiler]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def close(self):
|
|
pass
|