7 Commits

Author SHA1 Message Date
ikun-11451
c13bac894b 修了一点pyright错误喵~ 2025-11-29 19:17:40 +08:00
明天好像没什么
0e129d385e refactor: 统一类型注解风格并优化代码结构
- 将裸 except 改为显式 Exception 捕获
- 用列表推导式替换冗余 for 循环
- 为类属性添加 ClassVar 注解
- 统一 Union/Optional 写法为 |
- 移除未使用的导入
- 修复 SQLAlchemy 空值比较语法
- 优化字符串拼接与字典更新逻辑
- 补充缺失的 noqa 注释与异常链

BREAKING CHANGE: 所有插件基类的类级字段现要求显式 ClassVar 注解,自定义插件需同步更新
2025-10-31 22:42:39 +08:00
John Richard
7923eafef3 re-style: 格式化代码 2025-10-02 20:26:01 +08:00
雅诺狐
898208f425 perf(methods): 通过移除不必要的 self 参数优化方法签名
在包括 chat、plugin_system、schedule 和 mais4u 在内的多个模块中,消除冗余的实例引用。此次改动将无需访问实例状态的实用函数转换为静态方法,从而提升了内存效率,并使方法依赖关系更加清晰。
2025-09-20 10:55:06 +08:00
Windpicker-owo
8149731925 修复代码格式和文件名大小写问题 2025-08-31 20:50:17 +08:00
雅诺狐
d26dd0fb2a Refactor anti-injection system into modular subpackages
Split the anti-prompt-injector module into core, processors, management, and decision submodules for better maintainability and separation of concerns. Moved and refactored detection, shielding, statistics, user ban, message processing, and counter-attack logic into dedicated files. Updated imports and initialization in __init__.py and anti_injector.py to use the new structure. No functional changes to detection logic, but code organization is significantly improved.
2025-08-20 14:57:37 +08:00
雅诺狐
2d4745cd58 初始化 2025-08-11 19:34:18 +08:00