已关闭
[Bug-Report|缺陷反馈]: scripts/ Python 脚本存在未使用的 import(ruff F401) #89
syy_3597创建于  8月17日关闭于  8月17日
syy_3597
8月17日 创建

Describe the current behavior / 问题描述 (Mandatory / 必填)

scripts/ 目录下 2 个 Python 文件存在未使用的 import,违反 ruff F401 规则:

  1. scripts/build_util.py:16 — import re 未在文件中使用
import shutil
import stat
import re   # <--- 未使用
  1. scripts/update_tbe_tactic_json.py:15 — import sys 未在文件中使用
import logging
import stat
import sys   # <--- 未使用
from collections import namedtuple

Environment / 环境信息 (Mandatory / 必填)

不涉及特定环境

Describe the expected behavior / 预期结果 (Mandatory / 必填)

删除未使用的 import,可通过 ruff check scripts/ --select F401 --fix 自动修复。

Special notes for this issue/备注 (Optional / 选填)

改动 2 行,风险极低。仓库 pre-commit 已配置 ruff F401 检查,当前因这两个文件未修复会触发告警。

likedislike
east_yang成员
8月17日 评论:

已安排开发人员处理

likedislike
Ssyy_3597
8月17日 关联了pull request:fix: 修复 scripts/ 下 ruff 告警及 install_deps.sh dos2unix 问题
CANN-robotCANN-robot成员
8月17日 关闭了 issue
CANN-robotCANN-robot成员
8月17日 添加了label:resolved