Skip to content

Commit 489aa62

Browse files
author
Benjamin Moody
committed
check_sig_cohesion: fix error when expanded signal lengths mismatch.
Also reformat this as an f-string for readability.
1 parent 9a0d086 commit 489aa62

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

wfdb/io/_signal.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,8 @@ def check_sig_cohesion(self, write_fields, expanded):
194194
for ch in range(self.n_sig):
195195
if len(self.e_d_signal[ch]) != spf[ch] * self.sig_len:
196196
raise ValueError(
197-
"Length of channel "
198-
+ str(ch)
199-
+ "does not match samps_per_frame["
200-
+ str(ch + "]*sig_len")
197+
f"Length of channel {ch} does not match "
198+
f"samps_per_frame[{ch}]*sig_len"
201199
)
202200

203201
# For each channel (if any), make sure the digital format has no values out of bounds

0 commit comments

Comments
 (0)