33# Authors: The MNE-BIDS developers
44# SPDX-License-Identifier: BSD-3-Clause
55
6-
76import json
87import os
98import os .path as op
@@ -858,7 +857,9 @@ def test_handle_chpi_reading(tmp_path):
858857 meg_json_data_freq_mismatch ["HeadCoilFrequency" ][0 ] = 123
859858 _write_json (meg_json_path , meg_json_data_freq_mismatch , overwrite = True )
860859
861- with (pytest .warns (RuntimeWarning , match = "Defaulting to .* mne.Raw object" ),):
860+ with (
861+ pytest .warns (RuntimeWarning , match = "Defaulting to .* mne.Raw object" ),
862+ ):
862863 raw_read = read_raw_bids (bids_path , extra_params = dict (allow_maxshield = "yes" ))
863864
864865 # cHPI "off" according to sidecar, but present in the data
@@ -1079,7 +1080,9 @@ def test_handle_ieeg_coords_reading(bids_path, tmp_path):
10791080 _to_tsv (electrodes_dict , electrodes_fname )
10801081 # popping off channels should not result in an error
10811082 # however, a warning will be raised through mne-python
1082- 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+ ):
10831086 read_raw_bids (bids_path = bids_fname , verbose = False )
10841087
10851088 # make sure montage is set if there are coordinates w/ 'n/a'
@@ -1095,7 +1098,9 @@ def test_handle_ieeg_coords_reading(bids_path, tmp_path):
10951098 # electrode coordinates should be nan
10961099 # when coordinate is 'n/a'
10971100 nan_chs = [electrodes_dict ["name" ][i ] for i in [0 , 3 ]]
1098- with (pytest .warns (RuntimeWarning , match = "There are channels without locations" ),):
1101+ with (
1102+ pytest .warns (RuntimeWarning , match = "There are channels without locations" ),
1103+ ):
10991104 raw = read_raw_bids (bids_path = bids_fname , verbose = False )
11001105 for idx , ch in enumerate (raw .info ["chs" ]):
11011106 if ch ["ch_name" ] in nan_chs :
@@ -1223,7 +1228,9 @@ def test_handle_non_mne_channel_type(tmp_path):
12231228 channels_data ["type" ][ch_idx ] = "FOOBAR"
12241229 _to_tsv (data = channels_data , fname = channels_tsv_path )
12251230
1226- with (pytest .warns (RuntimeWarning , match = 'will be set to "misc"' ),):
1231+ with (
1232+ pytest .warns (RuntimeWarning , match = 'will be set to "misc"' ),
1233+ ):
12271234 raw = read_raw_bids (bids_path )
12281235
12291236 # Should be a 'misc' channel.
0 commit comments