Merged
fix(easyasc): use context manager when reading DSL file in check_ub_usage.py #436
fix(easyasc): use context manager when reading DSL file in check_ub_usage.py #436
Merged
liangjinxuan-2026Add on 6 days ago
liangjinxuan-2026
6 days ago

Fixes #238

Summary

Use with open(dsl_path, encoding="utf-8") as fp: when reading the DSL source file (ruff SIM115).

Verification

  • Verified syntax with ast.parse.
  • Verified ruff check --isolated --select SIM115 reports 0 violations.
  • Scope strictly limited to plugins-community/collaborative-agent-kernel-evolution/skills/dsl-baseline-generation-easyasc/scripts/check_ub_usage.py.
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for liangjinxuan-2026's contribution.)
liangjinxuan-2026liangjinxuan-2026
6 days ago Created pull request, commit 3cb4a5fe
liangjinxuan-2026liangjinxuan-2026
6 days ago Associated issue: [Bug]: Unclosed file handle in check_ub_usage.py
CANN-robotCANN-robotCollaborators
6 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
6 days ago Comments:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
plugins-community/collaborative-agent-kernel-evolution ✅ gcw_P2Mh5H1S, 金炯, xutianze (3/2) ✅ gcw_P2Mh5H1S (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

liangjinxuan-2026, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
6 days ago Set qq_37913898,w00934874,dengguojie,jon_jin,rxtfeng,gcw_P2Mh5H1S,songkai111,xutianze,pingchuantang,hanrui22,wangzheng97,hedi0515,benwallace52,linghuis,OpSphere,zihengwang2 as approver
CANN-robotCANN-robotCollaborators
6 days ago Set jon_jin,gcw_P2Mh5H1S as approver
jon_jin
jon_jinCollaborators6 days agoStart code review1
plugins-community/collaborative-agent-kernel-evolution/skills/dsl-baseline-generation-easyasc/scripts/check_ub_usage.py
@@ -162,3 +162,3 @@
162162 return (False, "no --dsl provided")
163163 try:
164- text = open(dsl_path, encoding="utf-8").read()
164+ with open(dsl_path, encoding="utf-8") as fp:
jon_jin
jon_jin6 days agoComments:

评审通过(代码层):open().read() 改为 with 上下文读取,行为不变、资源释放更确定。CI 流水线尚未触发,合入前建议评论 /compile 触发确认。

likedislike
liangjinxuan-2026
liangjinxuan-2026
5 days ago Comments:

/compile

likedislike
liangjinxuan-2026liangjinxuan-2026
5 days ago Pre merge succeeded (commit_id: 01338fab1b54142a42d35ac0c0fdd4344b1e20a7)
CANN-robot
CANN-robotCollaborators
5 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
5 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
5 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
5 days ago Added label: ci-pipeline-passed
jon_jin
jon_jinCollaborators
5 days ago Comments:

复核确认:CI 流水线已绿(ci-pipeline-passed),11-24 评审结论维持——本笔修复代码层通过、无新增发现。感谢触发流水线,后续按票面流程推进。

likedislike
jon_jinjon_jinCollaborators
5 days ago Resolved final issue
jon_jin
jon_jinCollaborators
4 days ago Comments:

/lgtm

likedislike
jon_jin
jon_jinCollaborators
4 days ago Comments:

本笔 CI 已绿(ci-pipeline-passed)、行内评审意见均已闭环,结论维持可投。烦请 @xutianze 抽空复核认可并补票(/lgtm /approve),谢谢。

likedislike
jon_jin
jon_jinCollaborators
4 days ago Comments:

本模块 approve 需域内票:CI 已绿、行内评审结论维持可投。烦请 @gcw_P2Mh5H1S 抽空复核认可并 /approve,谢谢。

likedislike
xutianze
xutianzeCollaborators
4 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
4 days ago Added label: lgtm
jon_jin
jon_jinCollaborators
4 days ago Comments:

@liangjinxuan-2026 您好,按社区治理规则统一同步一条提交节奏建议(两仓在途 PR 均已送达本留言):

单仓在途 PR 数量:CONTRIBUTING §2 建议「同一贡献者每仓 open PR 不超过 5 个(Draft 计入),达到或超过时先推进/关闭存量再提交」。您当前 skills 仓 open 13 笔(含今晚 19:26-19:28 新提交 7 笔)、cannbot 仓 2 笔,skills 仓已明显超上限。

建议处理:

  1. 并单:同主题/同文件族修复合并为一笔 PR——今晚 7 笔小修(undefined 名/缺导入/循环变量绑定)可并为一笔,两笔 dsl-test-generator 的 B023 修复、两笔 hooks linter 修复均可各自并单,减少逐笔评审与流水线轮次;
  2. 延缓新提交:存量收敛前建议暂缓新增 PR——每轮 CI 门禁资源成本不低,分散小笔会重复消耗;
  3. 进展:感谢配合——两仓已合入 11 笔(今日 10 笔),在链件补票中,CI 红件按此前定界评论处理即可。

对事不对人,感谢贡献与配合。

—— jon_jin

likedislike
Junyi
JunyiCollaborators
4 days ago Comments:

/approve

likedislike
CANN-robot
CANN-robotCollaborators
4 days ago Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: xutianze

likedislike
CANN-robotCANN-robotCollaborators
4 days ago Added label: approved
CANN-robotCANN-robotCollaborators
4 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
4 days ago Merged pull request