refactor(pbls/rbac): M11b-2c-T3 响应 QC #14 —— 删除 collect() 不可达分支 got is None and has_script 及重复 stat 变量 has_script(脚本存在性判断已下沉 _load_module_paths),py_compile OK,--check total=277 wildcard=0 aggregation_failures=0 PASS 不变
This commit is contained in:
parent
7515a8a255
commit
21efe866fa
@ -248,8 +248,8 @@ def collect():
|
||||
"""
|
||||
merged, notes, failures, conflicts = {}, [], [], []
|
||||
for mod in MODULES:
|
||||
script = os.path.join(WS_DIR, 'modules', mod, 'scripts', 'load_path.py')
|
||||
has_script = os.path.exists(script)
|
||||
# 脚本存在性判断已下沉到 _load_module_paths()(got is None 即代表脚本缺失),
|
||||
# 此处不再重复 stat(M11b-2c-T3 QC 退回意见 #14:清理不可达死代码)。
|
||||
got, err, failed = _load_module_paths(mod)
|
||||
|
||||
if mod == 'pbl_evidence':
|
||||
@ -291,8 +291,8 @@ def collect():
|
||||
notes.append('%s: aggregated %d paths%s' % (mod, len(got), tag))
|
||||
if failed:
|
||||
failures.append('%s: %s' % (mod, err))
|
||||
if got is None and has_script:
|
||||
failures.append('%s: script exists but nothing aggregated' % mod)
|
||||
# 注:此处无需再判 got is None —— 上方各分支在 got is None 时均已 continue
|
||||
# (M11b-2c-T3 QC 退回意见 #14 删除的不可达分支)。
|
||||
|
||||
for c in conflicts:
|
||||
notes.append('[conflict] ' + c)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user