Skip to content

Commit 41ae901

Browse files
authored
Type public Epochs, Evoked, and io members fully (#14056)
1 parent f2422db commit 41ae901

44 files changed

Lines changed: 1528 additions & 996 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added type annotations to public members of ``mne/io``, :class:`mne.Evoked`, and :class:`mne.Epochs`, by `Eric Larson`_.

doc/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,9 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
738738
# autodoc / autosummary
739739
autosummary_generate = True
740740
autodoc_default_options = {"inherited-members": None}
741+
# Types are documented (in human-readable numpydoc form) in the docstrings
742+
# themselves, so don't also render the annotations into the signatures.
743+
autodoc_typehints = "none"
741744

742745
# sphinxcontrib-bibtex
743746
bibtex_bibfiles = ["./references.bib"]

mne/defaults.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright the MNE-Python contributors.
44

55
from copy import deepcopy
6-
from typing import Any
6+
from typing import Any, Final
77

88
DEFAULTS: dict[str, Any] = dict(
99
color=dict(
@@ -405,6 +405,6 @@ def _handle_default(k, v=None):
405405

406406

407407
HEAD_SIZE_DEFAULT = 0.095 # in [m]
408-
_BORDER_DEFAULT = "mean"
409-
_INTERPOLATION_DEFAULT = "cubic"
410-
_EXTRAPOLATE_DEFAULT = "auto"
408+
_BORDER_DEFAULT: Final = "mean"
409+
_INTERPOLATION_DEFAULT: Final = "cubic"
410+
_EXTRAPOLATE_DEFAULT: Final = "auto"

0 commit comments

Comments
 (0)