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 Dec 16, 2024
1 parent 4abd83c commit 644d31d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions mne/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -1524,8 +1531,6 @@ def _read_wfdb_annotations(fname, suffix=None):
print(anno.__dict__)




@verbose
def events_from_annotations(
raw,
Expand Down
2 changes: 1 addition & 1 deletion mne/utils/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions mne/utils/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 644d31d

Please sign in to comment.