网表语义图生成器:输出结尾归一为恰好一个换行,修复末尾双换行致 end-of-file-fixer 拦截提交

This commit is contained in:
2026-09-16 14:01:03 +08:00
parent 8d331031d6
commit 2553f30fb8
+4 -1
View File
@@ -354,7 +354,10 @@ def render_semantic(packages, nets, pin_index, instances, nets_kb):
ap(f'| {ref} | {what} | {desc} |')
ap('')
return '\n'.join(L) + '\n'
# 文件结尾必须恰好一个换行:pre-commit end-of-file-fixer 同时禁止
# “无结尾换行”和“结尾空行”(双换行)。rstrip 归一化末尾多余换行
# (含上方收尾的 ap('')),今后增删末尾行也不会破坏提交门禁。
return '\n'.join(L).rstrip('\n') + '\n'
def dump_pins(packages, nets):