Skip to content

v3.3.3 · 社区 PR 4 合 1

Choose a tag to compare

@wbh604 wbh604 released this 06 May 08:51
· 109 commits to main since this release

v3.3.3 · 4 个社区 PR 集中处理

用户:"请你检查 github pulls 里面他们提交的内容 · 如果效果 ok 并且没有 bug 的话可以合并"

PR 处理决策

PR 作者 决策 备注
#52 lhb akshare 1.18+ 修复 @qdby26 ✅ 直接合并 真 bug · 高质量 · 6 mock test
#55 agent_analysis schema docs @DragonQuix ✅ 直接合并 纯文档 · 0 风险
#54 svg_radar import @DragonQuix ⚠️ Cherry-pick base 与 v3.3.2 冲突 · 手动应用 svg_radar 部分
#59 Py3.11 + svg_radar @Charlson852 ⚠️ 部分采纳 Py3.11 修复对 · 但原版有缩进 bug 会让 7 流派只渲染 1 个 · 仅 cherry-pick 修复部分

Bug #52 · LHB akshare 1.18+ "近一月" 失效(@qdby26)

```python

akshare 1.18+

ak.stock_lhb_stock_detail_em(symbol="002361", date="近一月")

→ TypeError: 'NoneType' object is not subscriptable

```

修法:

  • 用 `stock_lhb_stock_detail_date_em` 拿历史日期
  • 按 `days` 过滤
  • 逐日调 YYYYMMDD 格式
  • 列名归一化 `交易营业部名称 → 营业部名称`

Bug #54 · institutional.py 缺 svg_radar import(@DragonQuix)

v3.2 拆分时 `_render_competitive_analysis` 用了 svg_radar 但漏 import · Porter 5 forces 雷达图永远空。

Bug #59 · Python 3.11 嵌套 f-string 反斜杠 SyntaxError(@Charlson852)

```python

Python 3.11 不允许(3.12+ 才允许)

f'... {f"·\"...\"..." if skip else ""} ...'

→ SyntaxError: f-string expression part cannot include a backslash

修法:变量提取

skip_display = f'· <span style="color:#9ca3af">—{skip}' if skip else ''
f'... {skip_display} ...'
```

重要:PR #59 原版还有一个隐藏 bug — 把 `items.append(...)` 从 for-loop 内(8 缩进)错移到 for-loop 外(4 缩进),会导致 7 个流派只渲染最后一个 G 量化派。我们手工 cherry-pick 仅修复 skip_display · 保持 items.append 在 for-loop 内 · 加 `test_render_school_scores_renders_all_seven_groups` 守护。

测试

  • 348 tests 全过(343 baseline + 5 新 v3.3.3 + 6 新 #52)
  • 002217 真机 e2e: 614 KB HTML
  • 新增 `tests/test_v3_3_3_pr_fixes.py` (5 tests)
  • PR #52 自带 `tests/test_lhb_date_format_fix.py` (6 tests)

致谢

感谢以下贡献者:

  • @qdby26 · #52 LHB 完整修复 + 详细测试
  • @DragonQuix · #54 svg_radar import 修复 · #55 agent_analysis schema docs
  • @Charlson852 · #59 Python 3.11 兼容修复(思路对 · 我们只 cherry-pick 修复部分)

升级

```bash
hermes skills update wbh604/UZI-Skill/skills/deep-analysis

或

cd UZI-Skill && git pull
```