From 9226b32e34de4038cd5290addde020c798d00f28 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 13:20:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mne/report/report.py | 40 ++++++++++++++++++++++++---------------- mne/viz/misc.py | 10 +++++----- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/mne/report/report.py b/mne/report/report.py index 9eddb4b33d3..d498dc33a01 100644 --- a/mne/report/report.py +++ b/mne/report/report.py @@ -475,7 +475,17 @@ def _fig_to_img( def _get_bem_contour_figs_as_arrays( - *, sl, n_jobs, mri_fname, surfaces, orientation, src, trans, show, show_orientation, width + *, + sl, + n_jobs, + mri_fname, + surfaces, + orientation, + src, + trans, + show, + show_orientation, + width, ): """Render BEM surface contours on MRI slices. @@ -3626,21 +3636,19 @@ def _add_forward( ) self._add_bem( - subject=subject, - subjects_dir=subjects_dir, - src=src, - trans=trans, - decim=1, - n_jobs=1, - width=512, - image_format=image_format, - title="source space", - section=section, - tags=tags, - replace=replace, - ) - - + subject=subject, + subjects_dir=subjects_dir, + src=src, + trans=trans, + decim=1, + n_jobs=1, + width=512, + image_format=image_format, + title="source space", + section=section, + tags=tags, + replace=replace, + ) def _add_inverse_operator( self, diff --git a/mne/viz/misc.py b/mne/viz/misc.py index 2f4658b31ad..a08f4b60b14 100644 --- a/mne/viz/misc.py +++ b/mne/viz/misc.py @@ -32,7 +32,7 @@ from ..fixes import _safe_svd from ..rank import compute_rank from ..surface import read_surface -from ..transforms import _frame_to_str, apply_trans +from ..transforms import apply_trans from ..utils import ( _check_option, _mask_to_onsets_offsets, @@ -445,11 +445,11 @@ def _plot_mri_contours( if src_["coord_frame"] != FIFF.FIFFV_COORD_MRI: if trans is None: raise ValueError( - "Source space must be in MRI coordinates, or " - "provide a trans.") + "Source space must be in MRI coordinates, or provide a trans." + ) else: - points = apply_trans(np.linalg.inv(trans['trans']), points) - sources.append(apply_trans(mri_rasvox_t, points* 1e3)) + points = apply_trans(np.linalg.inv(trans["trans"]), points) + sources.append(apply_trans(mri_rasvox_t, points * 1e3)) sources = np.concatenate(sources, axis=0) # get the figure dimensions right