Merged
fix(hooks): remove duplicate NAME_PATTERN and MAX_NAME_LENGTH redefinitions in skills_linter.py #433
fix(hooks): remove duplicate NAME_PATTERN and MAX_NAME_LENGTH redefinitions in skills_linter.py #433
Merged
liangjinxuan-2026Add on 7 days ago
liangjinxuan-2026
7 days ago

Fixes #235

Summary

Remove duplicate local NAME_PATTERN / MAX_NAME_LENGTH definitions (already imported from _yaml_utils) and the resulting unused import re (ruff F811/F401).

Verification

  • Verified syntax with ast.parse.
  • Verified with ruff check --isolated --select E713,E714: 0 issues.
  • Scope strictly limited to plugins-community/collaborative-agent-kernel-evolution/hooks/skills_linter.py.
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for liangjinxuan-2026's contribution.)
liangjinxuan-2026liangjinxuan-2026
7 days ago Created pull request, commit 9e60a0b2
liangjinxuan-2026liangjinxuan-2026
7 days ago Associated issue: [Bug]: Duplicate NAME_PATTERN/MAX_NAME_LENGTH redefinition shadowing _yaml_utils import in skills_linter.py
CANN-robotCANN-robotCollaborators
7 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
7 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
7 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
7 days ago Set jon_jin,gcw_P2Mh5H1S as approver
jon_jin
jon_jinCollaborators6 days agoStart code review1
plugins-community/collaborative-agent-kernel-evolution/hooks/skills_linter.py
@@ -11,4 +11,3 @@
1111 
1212import logging
13-import re
1413import sys
jon_jin
jon_jin6 days agoComments:

评审通过(代码层):同 agents_linter——移除与 _yaml_utils import 遮蔽的本地重复定义(F811,同名常量值一致已核对)及未使用 re 导入。CI 流水线尚未触发,合入前建议评论 /compile 触发确认。

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

/compile

likedislike
liangjinxuan-2026liangjinxuan-2026
5 days ago Pre merge succeeded (commit_id: aa05b0f86539627778cf920e5437a6e82e8f661d)
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
5 days ago Comments:

/lgtm

likedislike
jon_jin
jon_jinCollaborators
5 days ago Comments:

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

likedislike
jon_jin
jon_jinCollaborators
5 days ago Comments:

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

likedislike
xutianze
xutianzeCollaborators
5 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
5 days ago Added label: lgtm
jon_jin
jon_jinCollaborators
5 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
sijiaali
sijiaali
4 days ago Comments:

修复本身没问题:skills_linter.py 的局部定义确实被 _yaml_utils 的同名导入覆盖。不过同目录的 agents_linter.py:27-28 还在重复定义 NAME_PATTERN / MAX_NAME_LENGTH(同样已经先从 _yaml_utils 导入),属于同一个问题。建议在本 PR 一并清掉,或至少留一个 follow-up issue,避免两个 linter 的行为继续分叉。

likedislike
Junyi
JunyiCollaborators
4 days ago Comments:

剩余未使用导入及 agents_linter.py 的同类重复定义由维护侧通过 Issue #253 跟踪,不阻塞本 PR。 /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