diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index d8cae0383..607f4f709 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -4195,13 +4195,12 @@ def test_write_bids_with_age_weight_info(tmp_path): bids_root = tmp_path / "bids" raw_fname = data_path / "MEG" / "sample" / "sample_audvis_trunc_raw.fif" raw = _read_raw_fif(raw_fname) - raw.info['subject_info'] = { - 'weight': np.array([75.]), - 'height': np.array([180.]), + raw.info["subject_info"] = { + "weight": np.array([75.0]), + "height": np.array([180.0]), } bids_path = _bids_path.copy().update(root=bids_root, datatype="meg", run=1) write_raw_bids(raw, bids_path=bids_path) bids_path = _bids_path.copy().update(root=bids_root, datatype="meg", run=2) write_raw_bids(raw, bids_path=bids_path) - diff --git a/mne_bids/write.py b/mne_bids/write.py index ca9373729..32d9c166f 100644 --- a/mne_bids/write.py +++ b/mne_bids/write.py @@ -525,8 +525,10 @@ def _participants_tsv(raw, subject_id, fname, overwrite=False): if len(cur_item) == 1: new_value.append(cur_item[0]) else: - raise ValueError(f"Value for key {key} is a list with more " - f"than one element. This is not supported.") + raise ValueError( + f"Value for key {key} is a list with more " + f"than one element. This is not supported." + ) else: new_value.append(cur_item)