@@ -189,7 +189,9 @@ def read_edf(
189189 ]
190190
191191 # 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+ )
193195 if verbose :
194196 print ("Number of bytes in header record: {}" .format (header_bytes ))
195197
@@ -222,7 +224,9 @@ def read_edf(
222224 )
223225
224226 # 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+ )
226230 if verbose :
227231 print (
228232 "Duration of each data record in seconds: {}" .format (block_duration )
@@ -240,7 +244,9 @@ def read_edf(
240244 # Label (e.g., EEG FpzCz or Body temp) (16 bytes each)
241245 sig_name = []
242246 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+ )
244250 if temp_sig == "EDF Annotations" and not rdedfann_flag :
245251 print (
246252 "*** This may be an EDF+ Annotation file instead, please see "
@@ -1118,7 +1124,9 @@ def rdedfann(
11181124 adjusted_hex = hex (
11191125 struct .unpack ("<H" , struct .pack (">H" , chunk + 1 ))[0 ]
11201126 )
1121- annotation_string += bytes .fromhex (adjusted_hex [2 :]).decode (encoding )
1127+ annotation_string += bytes .fromhex (adjusted_hex [2 :]).decode (
1128+ encoding
1129+ )
11221130 # Remove all of the whitespace
11231131 for rep in ["\x00 " , "\x14 " , "\x15 " ]:
11241132 annotation_string = annotation_string .replace (rep , " " )
0 commit comments