refactor(cleanup): 移除未使用的导入项与冗余代码

清理了整个代码库中所有无用的模块导入、重复定义以及冗余变量引用,具体包括:
- bot.py 去掉了 random、typing 的未使用 import
- antipromptinjector 模块统一移除未引用的 DetectionResult、Dict、List 等
- chat_loop 中删除了未调用的 Timer、mai_thinking_manager、events_manager 等引用
- qzone_service 删除多余 f-string 大括号,避免日志警告格式问题
- 其他模块同步剔除各自范围内的冗余 import(asyncio、datetime 等共 20+ 处)

保持功能不变,仅作代码整洁度优化,无破坏性变更。(并添加了一个现在暂时还没加进去的必应搜索源文件)
This commit is contained in:
minecraft1024a
2025-08-21 21:09:52 +08:00
committed by Windpicker-owo
parent be769e29c3
commit 2f1a9fa966
17 changed files with 449 additions and 22 deletions

View File

@@ -1,6 +1,5 @@
# mmc/src/common/database/monthly_plan_db.py
import datetime
from typing import List
from src.common.database.sqlalchemy_models import MonthlyPlan, get_db_session
from src.common.logger import get_logger