继承插件总基类,注释更新

This commit is contained in:
UnCLAS-Prommer
2025-07-17 00:28:14 +08:00
parent a83f8948e9
commit 696325cb57
5 changed files with 30 additions and 29 deletions

View File

@@ -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)