@@ -126,7 +126,7 @@ def _read_events(events, event_id, raw, bids_path=None):
126126 # retrieve events
127127 if isinstance (events , np .ndarray ):
128128 if events .ndim != 2 :
129- raise ValueError ("Events must have two dimensions, " f" found { events .ndim } " )
129+ raise ValueError (f "Events must have two dimensions, found { events .ndim } " )
130130 if events .shape [1 ] != 3 :
131131 raise ValueError (
132132 "Events must have second dimension of length 3, "
@@ -164,7 +164,7 @@ def _read_events(events, event_id, raw, bids_path=None):
164164 f"The provided raw data contains annotations, but "
165165 f'"event_id" does not contain entries for all annotation '
166166 f"descriptions. The following entries are missing: "
167- f' { ", " .join (desc_without_id )} '
167+ f" { ', ' .join (desc_without_id )} "
168168 )
169169
170170 # If we have events, convert them to Annotations so they can be easily
@@ -174,7 +174,7 @@ def _read_events(events, event_id, raw, bids_path=None):
174174 if ids_without_desc :
175175 raise ValueError (
176176 f"No description was specified for the following event(s): "
177- f' { ", " .join ([str (x ) for x in sorted (ids_without_desc )])} . '
177+ f" { ', ' .join ([str (x ) for x in sorted (ids_without_desc )])} . "
178178 f"Please add them to the event_id dictionary, or drop them "
179179 f"from the events array."
180180 )
@@ -409,9 +409,7 @@ def _handle_scans_reading(scans_fname, raw, bids_path):
409409 # Convert time offset to UTC
410410 acq_time = acq_time .astimezone (timezone .utc )
411411
412- logger .debug (
413- f"Loaded { scans_fname } scans file to set " f"acq_time as { acq_time } ."
414- )
412+ logger .debug (f"Loaded { scans_fname } scans file to set acq_time as { acq_time } ." )
415413 # First set measurement date to None and then call call anonymize() to
416414 # remove any traces of the measurement date we wish
417415 # to replace – it might lurk out in more places than just
@@ -728,7 +726,7 @@ def _handle_channels_reading(channels_fname, raw):
728726 if ch_diff :
729727 warn (
730728 f"Cannot set channel type for the following channels, as they "
731- f' are missing in the raw data: { ", " .join (sorted (ch_diff ))} '
729+ f" are missing in the raw data: { ', ' .join (sorted (ch_diff ))} "
732730 )
733731 raw .set_channel_types (
734732 channel_type_bids_mne_map_available_channels , on_unit_change = "ignore"
@@ -744,7 +742,7 @@ def _handle_channels_reading(channels_fname, raw):
744742 warn (
745743 f'Cannot set "bad" status for the following channels, as '
746744 f"they are missing in the raw data: "
747- f' { ", " .join (sorted (ch_diff ))} '
745+ f" { ', ' .join (sorted (ch_diff ))} "
748746 )
749747
750748 raw .info ["bads" ] = bads_avail
@@ -875,7 +873,7 @@ def read_raw_bids(
875873 and raw_path .is_symlink ()
876874 ):
877875 target_path = raw_path .resolve ()
878- logger .info (f"Resolving symbolic link: " f" { raw_path } -> { target_path } " )
876+ logger .info (f"Resolving symbolic link: { raw_path } -> { target_path } " )
879877 raw_path = target_path
880878 config_path = None
881879
@@ -1124,7 +1122,7 @@ def get_head_mri_trans(
11241122
11251123 if t1w_json_path is None or not t1w_json_path .exists ():
11261124 raise FileNotFoundError (
1127- f"Did not find T1w JSON sidecar file, tried location: " f" { t1w_json_path } "
1125+ f"Did not find T1w JSON sidecar file, tried location: { t1w_json_path } "
11281126 )
11291127 for extension in (".nii" , ".nii.gz" ):
11301128 t1w_path_candidate = t1w_json_path .with_suffix (extension )
@@ -1135,7 +1133,7 @@ def get_head_mri_trans(
11351133 if not t1w_bids_path .fpath .exists ():
11361134 raise FileNotFoundError (
11371135 f"Did not find T1w recording file, tried location: "
1138- f' { t1w_path_candidate .name .replace (" .nii.gz" , "" )} [.nii, .nii.gz]'
1136+ f" { t1w_path_candidate .name .replace (' .nii.gz' , '' )} [.nii, .nii.gz]"
11391137 )
11401138
11411139 # Get MRI landmarks from the JSON sidecar
0 commit comments