Commit Graph

5 Commits

Author SHA1 Message Date
1b484d7fda fix: 修复 damo_balance 引号语法错误及 chatai bleach 缺失依赖
- damo_balance/__init__.py: 将外层字符串改为单引号,消除内嵌双引号引起的 SyntaxError
- chatai/screenshot.py: bleach 改为 try/except 可选导入,无 bleach 时降级跳过 HTML 净化
- requirements.txt: 补充 openai>=1.0.0 与 pyppeteer>=1.0.2 依赖声明
2026-05-11 22:43:27 +08:00
c62ac37611 review: fix critical/medium bugs in 4 plugins (round 2)
group_horse_racing:
- settle_race: rewrite with 7 bug fixes (race condition, draw double-credit, empty participants, etc.)
- models.py: reorder fields for correct defaults, add indexes
- message_service: add logger import

danding_points:
- api.py: add finally blocks to 3 methods (add_points, get_history, get_leaderboard)
- database.py: add finally block to get_user_balance

chatai:
- __init__.py: deprecated API→asyncio.to_thread, deduplicate logging, taskkill filter for safety
- screenshot.py: XSS protection with bleach on HTML content
- requirements.txt: add bleach dependency

danding_qqpush:
- api.py L13: fix self-referencing _renderer NameError crash
- api.py: lazy singleton pattern via _get_renderer() instead of per-request ImageRenderer
- __init__.py: mask Token in log output (security)

All 34 tests pass.
2026-05-10 00:30:22 +08:00
9a4c708079 chore(deps): remove 7 unused packages (tortoise-orm, asyncmy, asyncodbc, asyncpg, pyodbc, pypika-tortoise, nonebot-plugin-tortoise-orm)
None of these packages are imported by any plugin. Saves ~15 transitive deps.
2026-05-09 23:28:21 +08:00
2214e22b80 feat: 添加 pilmoji 依赖并支持渲染 emoji 表情
- 在 requirements.txt 中添加 pilmoji==2.0.5 依赖
- 重构 ImageRenderer 类,使用 Pilmoji 替代 PIL 的原生 text 方法以支持渲染 emoji 表情
- 将字体路径配置提取为类常量 DEFAULT_FONT_PATHS,并包含 Windows 和 Linux 的默认路径
- 初始化方法中的 font_paths 参数默认为 None,自动使用默认字体路径列表
2026-04-04 22:27:00 +08:00
4a944316fe 首次提交 2025-12-26 22:41:42 +08:00