scripts/build_util.py:56 使用 dict() 构造空字典,违反 ruff C408 规则:
scripts/build_util.py:56
dict()
# scripts/build_util.py:54-56 def get_info_from_file(file_path): result = True tactic_info = dict() # <--- 应改为 {}
dict() 调用比字面量 {} 更慢且不够 Pythonic,ruff C408 规则建议统一使用字面量。
{}
不涉及特定环境
将 dict() 替换为 {}:
tactic_info = {}
改动仅 1 行,风险极低。
已安排开发人员处理
Describe the current behavior / 问题描述 (Mandatory / 必填)
scripts/build_util.py:56使用dict()构造空字典,违反 ruff C408 规则:# scripts/build_util.py:54-56 def get_info_from_file(file_path): result = True tactic_info = dict() # <--- 应改为 {}dict()调用比字面量{}更慢且不够 Pythonic,ruff C408 规则建议统一使用字面量。Environment / 环境信息 (Mandatory / 必填)
不涉及特定环境
Describe the expected behavior / 预期结果 (Mandatory / 必填)
将
dict()替换为{}:Special notes for this issue/备注 (Optional / 选填)
改动仅 1 行,风险极低。