chore(comments): Test 仓注释英文化(R11)
把 81 个 .vp 文件的中文 # 注释与三引号文档串改写为简洁英文,每个连续注释块 <=2 行;运行时中文字符串字面量(testcheck.begin/print 等用户可见消息)保持原样。骨架比对 HEAD 与工作区 112 文件漂移 0,全量 77/77 顺序回归通过。
This commit is contained in:
1 parent
aa5a7e7250
commit
ee6461be46
81 files changed
+1231
-1925
No files matched your search
+5
-5
@@ -6,18 +6,18 @@ import testcheck
|
||||
import remote
|
||||
|
||||
|
||||
# 同模块函数(有 docstring)
|
||||
# Same-module function (has docstring).
|
||||
def local_func() -> int:
|
||||
"Local function docstring."
|
||||
return 0
|
||||
|
||||
|
||||
# 同模块函数(无 docstring)
|
||||
# Same-module function (no docstring).
|
||||
def no_doc_func() -> int:
|
||||
return 0
|
||||
|
||||
|
||||
# 同模块类(有 docstring)
|
||||
# Same-module class (has docstring).
|
||||
class LocalClass:
|
||||
"Local class docstring."
|
||||
value: int
|
||||
@@ -28,7 +28,7 @@ class LocalClass:
|
||||
|
||||
|
||||
def _check_doc_adaptive(name: str, doc: str, expected: str):
|
||||
"""自适应检查 docstring:非空时验证匹配,空时视为优化剥离"""
|
||||
"""Check docstring: verify when present, treat null as optimized out."""
|
||||
if doc is None:
|
||||
testcheck.ok(f"{name}: __doc__ optimized out (null)")
|
||||
return
|
||||
@@ -39,7 +39,7 @@ def _check_doc_adaptive(name: str, doc: str, expected: str):
|
||||
|
||||
|
||||
def _check_doc_null(name: str, doc: str):
|
||||
"""检查 docstring 为 null(无 docstring 的符号)"""
|
||||
"""Check that a symbol's docstring is null."""
|
||||
if doc is None:
|
||||
testcheck.ok(f"{name}: __doc__ is null")
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user