Closed
[Bug]: Duplicate NAME_PATTERN/MAX_NAME_LENGTH redefinition shadowing _yaml_utils import in agents_linter.py #234
liangjinxuan-2026Add on  7 days agoClosed at  5 days ago
liangjinxuan-2026
liangjinxuan-2026
7 days ago Create

Description

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

Affected File

plugins-community/collaborative-agent-kernel-evolution/hooks/agents_linter.py

Verification

Verified locally with ast.parse and ruff check --isolated --select E713,E714 (0 violations after fix).

likedislike
liangjinxuan-2026liangjinxuan-2026
7 days ago Associated pull request
jon_jin
jon_jinCollaborators
7 days ago Comments:

@liangjinxuan-2026 收到,本单按缺陷反馈处理。先做与 #235 的关联判定:

一、关联判定:与 #235 系同一缺陷族不同文件——NAME_PATTERN / MAX_NAME_LENGTH 重复本地定义(已从 _yaml_utils import)+ import re 未使用的病根,落在 collaborative-agent-kernel-evolution/hooks/ 下两个 linter 文件——互补分单互链,载体各自独立(!432 / !433),不混线。

二、复述(如有偏差请指正)
hooks/agents_linter.py 中 NAME_PATTERN / MAX_NAME_LENGTH 重复本地定义遮蔽 _yaml_utils import,连带 import re 未使用(ruff F811/F401);本地验证修复后 0 违规。

三、载体核实(2026-11-23 实查)
自解载体 !432 实存(20:10:23,本单后 5 秒,标题吻合)——assign 已转你名下。

四、问询

  1. hooks/ 目录其余脚本同形态重复定义全量清点(是否仅此两处),结论写进任一 PR 描述,评审一次看全;
  2. 两 PR 描述互注姊妹件;Fixes 挂法补办。

—— jon_jin

likedislike
jon_jinjon_jinCollaborators
7 days ago Assign liangjinxuan-2026 as responsible person
CANN-robotCANN-robotCollaborators
5 days ago Close issue
CANN-robotCANN-robotCollaborators
5 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
5 days ago Added label: resolved