MCPcopy Create free account
hub / github.com/mne-tools/mne-python / __eq__

Method __eq__

mne/annotations.py:1090–1101  ·  view source on GitHub ↗

Compare to another HEDAnnotations instance.

(self, other)

Source from the content-addressed store, hash-verified

1088 return hed_string
1089
1090 def __eq__(self, other):
1091 """Compare to another HEDAnnotations instance."""
1092 if not super().__eq__(other):
1093 return False
1094 _slf = self.hed_string
1095 _oth = other.hed_string
1096
1097 if _compare_version(self._hed_version, "<", other._hed_version):
1098 _slf = [_slf._validate_hed_string(v, _oth._schema) for v in _slf._objs]
1099 elif _compare_version(self._hed_version, ">", other._hed_version):
1100 _oth = [_oth._validate_hed_string(v, _slf._schema) for v in _oth._objs]
1101 return _slf == _oth
1102
1103 def __repr__(self):
1104 """Show a textual summary of the object."""

Callers

nothing calls this directly

Calls 3

_compare_versionFunction · 0.85
_validate_hed_stringMethod · 0.80
__eq__Method · 0.45

Tested by

no test coverage detected