From 1a6d6edbe14f00df021a1e826d8d30555f301e30 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Mon, 5 Jan 2026 14:39:35 +0800 Subject: fix: simplify conditional assignment for entity text processing in test_onnx_only_infer.py --- tests/test_onnx_only_infer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_onnx_only_infer.py b/tests/test_onnx_only_infer.py index 69c72be..d41e7fd 100644 --- a/tests/test_onnx_only_infer.py +++ b/tests/test_onnx_only_infer.py @@ -187,9 +187,7 @@ for e in entities: conf = round(float(np.mean(e["probs"])), 3) typ = e["type"] if typ in ("timestamp", "speaker"): - ent_text = ( - fix_timestamp(ent_text) if typ == "timestamp" else fix_speaker(ent_text) - ) + ent_text = fix_timestamp(ent_text) if typ == "timestamp" else fix_speaker(ent_text) out["metadata"][typ] = ent_text else: out["content"].append({"type": typ, "content": ent_text, "confidence": conf}) -- cgit v1.2.3-70-g09d2