插件系统代码风格修复

This commit is contained in:
DrSmoothl
2026-03-13 11:07:19 +08:00
parent bcb7963d37
commit 8ac0aff479
15 changed files with 55 additions and 47 deletions

View File

@@ -11,10 +11,10 @@
from typing import Any, Dict, List, Optional
from src.common.logger import get_logger
import re
from src.common.logger import get_logger
logger = get_logger("plugin_runtime.host.component_registry")
@@ -32,7 +32,7 @@ class RegisteredComponent:
component_type: str,
plugin_id: str,
metadata: Dict[str, Any],
):
) -> None:
self.name = name
self.full_name = f"{plugin_id}.{name}"
self.component_type = component_type
@@ -57,7 +57,7 @@ class ComponentRegistry:
供业务层查询可用组件、匹配命令、调度 action/event 等。
"""
def __init__(self):
def __init__(self) -> None:
# 全量索引
self._components: Dict[str, RegisteredComponent] = {} # full_name -> comp