Closed
[Bug-Report|缺陷反馈]: scripts/ Python 脚本存在未使用的 import(ruff F401) #89
syy_3597Add on  Aug 17Closed at  Aug 17
syy_3597
Aug 17 Create

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_yangCollaborators
Aug 17 Comments:

已安排开发人员处理

likedislike
Ssyy_3597
Aug 17 Associated pull request
CANN-robotCANN-robotCollaborators
Aug 17 Close issue
CANN-robotCANN-robotCollaborators
Aug 17 Added label: resolved