继承插件总基类,注释更新
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from abc import abstractmethod
|
||||
|
||||
class BaseEventsPlugin(ABC):
|
||||
from .plugin_base import PluginBase
|
||||
from src.common.logger import get_logger
|
||||
|
||||
|
||||
class BaseEventPlugin(PluginBase):
|
||||
"""基于事件的插件基类
|
||||
|
||||
所有事件类型的插件都应该继承这个基类
|
||||
"""
|
||||
事件触发型插件基类
|
||||
|
||||
所有事件触发型插件都应该继承这个基类而不是 BasePlugin
|
||||
"""
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def plugin_name(self) -> str:
|
||||
return "" # 插件内部标识符(如 "hello_world_plugin")
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def enable_plugin(self) -> bool:
|
||||
return False
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user