Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 25, 2024
1 parent 19b3c8e commit ea2b7e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 3 additions & 4 deletions mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

6 changes: 4 additions & 2 deletions mne_bids/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ea2b7e1

Please sign in to comment.