@@ -189,7 +189,9 @@ def read_edf(
189
189
]
190
190
191
191
# Number of bytes in header (8 bytes)
192
- header_bytes = int (struct .unpack ("<8s" , edf_file .read (8 ))[0 ].decode (encoding ))
192
+ header_bytes = int (
193
+ struct .unpack ("<8s" , edf_file .read (8 ))[0 ].decode (encoding )
194
+ )
193
195
if verbose :
194
196
print ("Number of bytes in header record: {}" .format (header_bytes ))
195
197
@@ -222,7 +224,9 @@ def read_edf(
222
224
)
223
225
224
226
# Duration of a block, in seconds (8 bytes)
225
- block_duration = float (struct .unpack ("<8s" , edf_file .read (8 ))[0 ].decode (encoding ))
227
+ block_duration = float (
228
+ struct .unpack ("<8s" , edf_file .read (8 ))[0 ].decode (encoding )
229
+ )
226
230
if verbose :
227
231
print (
228
232
"Duration of each data record in seconds: {}" .format (block_duration )
@@ -240,7 +244,9 @@ def read_edf(
240
244
# Label (e.g., EEG FpzCz or Body temp) (16 bytes each)
241
245
sig_name = []
242
246
for _ in range (n_sig ):
243
- temp_sig = struct .unpack ("<16s" , edf_file .read (16 ))[0 ].decode (encoding ).strip ()
247
+ temp_sig = (
248
+ struct .unpack ("<16s" , edf_file .read (16 ))[0 ].decode (encoding ).strip ()
249
+ )
244
250
if temp_sig == "EDF Annotations" and not rdedfann_flag :
245
251
print (
246
252
"*** This may be an EDF+ Annotation file instead, please see "
@@ -1118,7 +1124,9 @@ def rdedfann(
1118
1124
adjusted_hex = hex (
1119
1125
struct .unpack ("<H" , struct .pack (">H" , chunk + 1 ))[0 ]
1120
1126
)
1121
- annotation_string += bytes .fromhex (adjusted_hex [2 :]).decode (encoding )
1127
+ annotation_string += bytes .fromhex (adjusted_hex [2 :]).decode (
1128
+ encoding
1129
+ )
1122
1130
# Remove all of the whitespace
1123
1131
for rep in ["\x00 " , "\x14 " , "\x15 " ]:
1124
1132
annotation_string = annotation_string .replace (rep , " " )
0 commit comments