From 644d31d63013e6b10e29b417d266814806bbaede Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:24:42 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mne/annotations.py | 11 ++++++++--- mne/utils/__init__.pyi | 2 +- mne/utils/check.py | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mne/annotations.py b/mne/annotations.py index e200d1c24d4..30f651203b1 100644 --- a/mne/annotations.py +++ b/mne/annotations.py @@ -1141,7 +1141,13 @@ def _write_annotations_txt(fname, annot): @fill_doc def read_annotations( - fname, sfreq="auto", uint16_codec=None, encoding="utf8", ignore_marker_types=False, fmt="auto", suffix=None + fname, + sfreq="auto", + uint16_codec=None, + encoding="utf8", + ignore_marker_types=False, + fmt="auto", + suffix=None, ) -> Annotations: r"""Read annotations from a file. @@ -1516,6 +1522,7 @@ def _check_event_description(event_desc, events): return event_desc + def _read_wfdb_annotations(fname, suffix=None): """Read annotations from wfdb format.""" wfdb = _check_wfdb_installed(strict=True) @@ -1524,8 +1531,6 @@ def _read_wfdb_annotations(fname, suffix=None): print(anno.__dict__) - - @verbose def events_from_annotations( raw, diff --git a/mne/utils/__init__.pyi b/mne/utils/__init__.pyi index c6663a68a4d..770afd0bde6 100644 --- a/mne/utils/__init__.pyi +++ b/mne/utils/__init__.pyi @@ -247,7 +247,6 @@ from .check import ( _check_preload, _check_pybv_installed, _check_pymatreader_installed, - _check_wfdb_installed, _check_qt_version, _check_range, _check_rank, @@ -256,6 +255,7 @@ from .check import ( _check_stc_units, _check_subject, _check_time_format, + _check_wfdb_installed, _ensure_events, _ensure_int, _import_h5io_funcs, diff --git a/mne/utils/check.py b/mne/utils/check.py index 8fbaab694b1..723b88b05bc 100644 --- a/mne/utils/check.py +++ b/mne/utils/check.py @@ -452,6 +452,7 @@ def _check_edfio_installed(strict=True): """Aux function.""" return _soft_import("edfio", "exporting to EDF", strict=strict) + def _check_wfdb_installed(strict=True): """Aux function.""" return _soft_import("wfdb", "MIT WFDB IO", strict=strict)