@@ -232,10 +232,10 @@ def _parse_header(self):
232232 "ADC channels must be contiguous. Open an issue in python-neo to request this feature."
233233 )
234234
235-
236235 # Find sync channel and verify it's the last channel
237236 sync_index = next (
238- (index for index , ch in enumerate (info ["channels" ]) if ch ["channel_name" ].endswith ("_SYNC" )), None
237+ (index for index , ch in enumerate (info ["channels" ]) if ch ["channel_name" ].endswith ("_SYNC" )),
238+ None ,
239239 )
240240 if sync_index is not None and sync_index != num_channels - 1 :
241241 raise ValueError (
@@ -452,21 +452,22 @@ def _parse_header(self):
452452 info = self ._sig_streams [block_index ][seg_index ][_sig_stream_index ]
453453 has_sync_trace = self ._sig_streams [block_index ][seg_index ][_sig_stream_index ]["has_sync_trace" ]
454454
455- for k in ("identifier" , "history" , "source_processor_index" , "recorded_processor_index" ):
456- if k in info ["channels" ][0 ]:
457- values = np .array ([chan_info [k ] for chan_info in info ["channels" ]])
458-
459-
455+ for key in ("identifier" , "history" , "source_processor_index" , "recorded_processor_index" ):
456+ if key in info ["channels" ][0 ]:
457+ values = np .array ([chan_info [key ] for chan_info in info ["channels" ]])
458+
460459 if has_sync_trace :
461460 values = values [:- 1 ]
462461
463- num_neural_channels = sum (1 for ch_info in info ["channels" ] if "ADC" not in ch_info ["channel_name" ])
462+ num_neural_channels = sum (
463+ 1 for ch_info in info ["channels" ] if "ADC" not in ch_info ["channel_name" ]
464+ )
464465 if is_neural_stream :
465466 values = values [:num_neural_channels ]
466467 else :
467468 values = values [num_neural_channels :]
468469
469- sig_ann ["__array_annotations__" ][k ] = values
470+ sig_ann ["__array_annotations__" ][key ] = values
470471
471472 # array annotations for event channels
472473 # use other possible data in _possible_event_stream_names
0 commit comments