scripts/ 目录下 2 个 Python 文件存在未使用的 import,违反 ruff F401 规则:
scripts/
scripts/build_util.py:16
import re
import shutil import stat import re # <--- 未使用
scripts/update_tbe_tactic_json.py:15
import sys
import logging import stat import sys # <--- 未使用 from collections import namedtuple
不涉及特定环境
删除未使用的 import,可通过 ruff check scripts/ --select F401 --fix 自动修复。
ruff check scripts/ --select F401 --fix
改动 2 行,风险极低。仓库 pre-commit 已配置 ruff F401 检查,当前因这两个文件未修复会触发告警。
已安排开发人员处理
Describe the current behavior / 问题描述 (Mandatory / 必填)
scripts/目录下 2 个 Python 文件存在未使用的 import,违反 ruff F401 规则:scripts/build_util.py:16—import re未在文件中使用import shutil import stat import re # <--- 未使用scripts/update_tbe_tactic_json.py:15—import sys未在文件中使用import logging import stat import sys # <--- 未使用 from collections import namedtupleEnvironment / 环境信息 (Mandatory / 必填)
不涉及特定环境
Describe the expected behavior / 预期结果 (Mandatory / 必填)
删除未使用的 import,可通过
ruff check scripts/ --select F401 --fix自动修复。Special notes for this issue/备注 (Optional / 选填)
改动 2 行,风险极低。仓库 pre-commit 已配置 ruff F401 检查,当前因这两个文件未修复会触发告警。