mirror of
https://gitee.com/xmz7891/ykxmz.git
synced 2026-10-18 13:40:45 +00:00
补两个自检失败:build_exe.ps1 丢 BOM + run_agent 用了未导入的 time
全量回归只剩这两项红,都是我这几步引入的: 1. 编码审计:build_exe.ps1 缺 UTF-8 BOM 我用 edit 工具改它时把 BOM 丢了。PowerShell 5.1 会按 GBK 读, 里面的中文注释会变乱码。 2. Python 静态检查:run_agent.py:760 undefined name 'time' 我在 _restart_background 里用了 time.sleep,但 run_agent.py 模块级没有 import time(原来只有 run_silent 里局部 import)。 补上之后顺手在注释里记一笔:pyflakes 这一关是有用的。 顺带:test_double_click_window.py 的注释里我原样写了两个 U+FFFD 替换字符当例子,被编码审计当成乱码 —— 改成用文字描述。 现在全量回归 41 个阶段全部通过。
This commit is contained in:
@@ -409,9 +409,9 @@ Banner "3a7/7 Python 语法(必须用 compile,不能用 ast.parse)"
|
||||
# 这一轮被同一件事咬了三次:补丁脚本把 import 插到 from __future__
|
||||
# 前面,整个文件就废了。而更糟的是 ast.parse 查不出来(它只解析,
|
||||
# 不做编译期检查)—— 前几次「全仓语法检查 0 问题」都是假绿。
|
||||
= & python (Join-Path "_tests\check_python_syntax.py") 2>&1
|
||||
Show-Fails
|
||||
Record "Python 语法检查" ( -eq 0)
|
||||
$stageOut = & python (Join-Path $root "_tests\check_python_syntax.py") 2>&1
|
||||
Show-Fails $stageOut
|
||||
Record "Python 语法检查" ($LASTEXITCODE -eq 0)
|
||||
|
||||
# ---------------------------------------------------------------- 3a5
|
||||
Banner "3a5/7 局域网/中转对比基准(防测试自己骗人)"
|
||||
|
||||
Reference in New Issue
Block a user