@@ -857,7 +857,9 @@ def test_handle_chpi_reading(tmp_path):
857857 meg_json_data_freq_mismatch ["HeadCoilFrequency" ][0 ] = 123
858858 _write_json (meg_json_path , meg_json_data_freq_mismatch , overwrite = True )
859859
860- with (pytest .warns (RuntimeWarning , match = "Defaulting to .* mne.Raw object" ),):
860+ with (
861+ pytest .warns (RuntimeWarning , match = "Defaulting to .* mne.Raw object" ),
862+ ):
861863 raw_read = read_raw_bids (bids_path , extra_params = dict (allow_maxshield = "yes" ))
862864
863865 # cHPI "off" according to sidecar, but present in the data
@@ -1078,7 +1080,9 @@ def test_handle_ieeg_coords_reading(bids_path, tmp_path):
10781080 _to_tsv (electrodes_dict , electrodes_fname )
10791081 # popping off channels should not result in an error
10801082 # however, a warning will be raised through mne-python
1081- with (pytest .warns (RuntimeWarning , match = "DigMontage is only a subset of info" ),):
1083+ with (
1084+ pytest .warns (RuntimeWarning , match = "DigMontage is only a subset of info" ),
1085+ ):
10821086 read_raw_bids (bids_path = bids_fname , verbose = False )
10831087
10841088 # make sure montage is set if there are coordinates w/ 'n/a'
@@ -1094,7 +1098,9 @@ def test_handle_ieeg_coords_reading(bids_path, tmp_path):
10941098 # electrode coordinates should be nan
10951099 # when coordinate is 'n/a'
10961100 nan_chs = [electrodes_dict ["name" ][i ] for i in [0 , 3 ]]
1097- with (pytest .warns (RuntimeWarning , match = "There are channels without locations" ),):
1101+ with (
1102+ pytest .warns (RuntimeWarning , match = "There are channels without locations" ),
1103+ ):
10981104 raw = read_raw_bids (bids_path = bids_fname , verbose = False )
10991105 for idx , ch in enumerate (raw .info ["chs" ]):
11001106 if ch ["ch_name" ] in nan_chs :
@@ -1222,7 +1228,9 @@ def test_handle_non_mne_channel_type(tmp_path):
12221228 channels_data ["type" ][ch_idx ] = "FOOBAR"
12231229 _to_tsv (data = channels_data , fname = channels_tsv_path )
12241230
1225- with (pytest .warns (RuntimeWarning , match = 'will be set to "misc"' ),):
1231+ with (
1232+ pytest .warns (RuntimeWarning , match = 'will be set to "misc"' ),
1233+ ):
12261234 raw = read_raw_bids (bids_path )
12271235
12281236 # Should be a 'misc' channel.
@@ -1464,7 +1472,6 @@ def test_gsr_and_temp_reading():
14641472
14651473def test_events_file_to_annotation_kwargs (tmp_path ):
14661474 """Test that events file is read correctly."""
1467-
14681475 bids_path = BIDSPath (
14691476 subject = "01" , session = "eeg" , task = "rest" , datatype = "eeg" , root = tiny_bids_root
14701477 )
0 commit comments