chore: 代码格式化与类型注解优化
对项目中的多个文件进行了代码风格调整和类型注解更新。
- 使用 ruff 工具对代码进行自动格式化,主要包括:
- 统一 import 语句的顺序和风格。
- 移除未使用的 import。
- 调整代码间距和空行。
- 将部分 `Optional[str]` 和 `List[T]` 等旧式类型注解更新为现代的 `str | None` 和 `list[T]` 语法。
- 修复了一些小的代码风格问题,例如将 `f'...'` 更改为 `f"..."`。
This commit is contained in:
@@ -7,7 +7,6 @@ from src.plugin_system import (
|
||||
BaseEventHandler,
|
||||
BasePlugin,
|
||||
BasePrompt,
|
||||
ToolParamType,
|
||||
BaseTool,
|
||||
ChatType,
|
||||
CommandArgs,
|
||||
@@ -15,6 +14,7 @@ from src.plugin_system import (
|
||||
ConfigField,
|
||||
EventType,
|
||||
PlusCommand,
|
||||
ToolParamType,
|
||||
register_plugin,
|
||||
)
|
||||
from src.plugin_system.base.base_event import HandlerResult
|
||||
|
||||
Reference in New Issue
Block a user