perf(methods): 通过移除不必要的 self 参数优化方法签名
在包括 chat、plugin_system、schedule 和 mais4u 在内的多个模块中,消除冗余的实例引用。此次改动将无需访问实例状态的实用函数转换为静态方法,从而提升了内存效率,并使方法依赖关系更加清晰。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
from datetime import datetime
|
||||
from typing import List, Tuple, Type, Optional
|
||||
|
||||
from dateutil.parser import parse as parse_datetime
|
||||
|
||||
from src.common.logger import get_logger
|
||||
@@ -14,7 +15,7 @@ from src.plugin_system import (
|
||||
ActionActivationType,
|
||||
)
|
||||
from src.plugin_system.apis import send_api, llm_api, generator_api
|
||||
from src.plugin_system.base.component_types import ChatType, ComponentType
|
||||
from src.plugin_system.base.component_types import ComponentType
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user