MCPcopy Index your code
hub / github.com/mne-tools/mne-python / _validate_value

Method _validate_value

mne/annotations.py:95–108  ·  view source on GitHub ↗
(
        value: dict | _AnnotationsExtrasDict | None,
    )

Source from the content-addressed store, hash-verified

93
94 @staticmethod
95 def _validate_value(
96 value: dict | _AnnotationsExtrasDict | None,
97 ) -> _AnnotationsExtrasDict:
98 _validate_type(
99 value,
100 (dict, _AnnotationsExtrasDict, None),
101 "extras dict value",
102 "dict or None",
103 )
104 return (
105 value
106 if isinstance(value, _AnnotationsExtrasDict)
107 else _AnnotationsExtrasDict(value or {})
108 )
109
110 def __init__(self, initlist=None):
111 if not (isinstance(initlist, _AnnotationsExtrasList) or initlist is None):

Callers 4

__init__Method · 0.95
__setitem__Method · 0.95
appendMethod · 0.95
insertMethod · 0.95

Calls 2

_validate_typeFunction · 0.85

Tested by

no test coverage detected