QChatGPT/pkg/plugin/loader.py

26 lines
464 B
Python
Raw Normal View History

2024-01-29 21:22:27 +08:00
from __future__ import annotations
from abc import ABCMeta
import typing
import abc
from ..core import app
from . import context, events
class PluginLoader(metaclass=abc.ABCMeta):
2024-03-03 16:34:59 +08:00
"""插件加载器抽象类"""
2024-01-29 21:22:27 +08:00
ap: app.Application
def __init__(self, ap: app.Application):
self.ap = ap
async def initialize(self):
pass
@abc.abstractmethod
async def load_plugins(self) -> list[context.RuntimeContainer]:
pass