[文档]def__init__(self,kb:KnowledgeBase):# This call is needed, because some Plugins like TypesStore inherit from KnowledgeBasePlugin and something else# So we still need to call the constructor of the other class.super().__init__()self._kb=kb
[文档]@staticmethoddefregister_default(name,cls):ifnameindefault_plugins:raiseException(f"{default_plugins[name]} is already set as the default for {name}")default_plugins[name]=cls