From 2d0ec356adde63dc4ceaf904ead06edfb4e4d907 Mon Sep 17 00:00:00 2001 From: Wanderingss <1624155937@qq.com> Date: Wed, 16 Sep 2026 14:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E8=A1=A8=E8=AF=AD=E4=B9=89=E5=9B=BE?= =?UTF-8?q?=E7=94=9F=E6=88=90=E5=99=A8=EF=BC=9A=E8=BE=93=E5=87=BA=E7=BB=93?= =?UTF-8?q?=E5=B0=BE=E5=BD=92=E4=B8=80=E4=B8=BA=E6=81=B0=E5=A5=BD=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=8D=A2=E8=A1=8C=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=9C=AB?= =?UTF-8?q?=E5=B0=BE=E5=8F=8C=E6=8D=A2=E8=A1=8C=E8=87=B4=20end-of-file-fix?= =?UTF-8?q?er=20=E6=8B=A6=E6=88=AA=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/netlist_semantics/netlist_sem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/netlist_semantics/netlist_sem.py b/tools/netlist_semantics/netlist_sem.py index c05e0d2f..6fed0f42 100644 --- a/tools/netlist_semantics/netlist_sem.py +++ b/tools/netlist_semantics/netlist_sem.py @@ -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):