MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / __eq__

Method __eq__

src/pendulum/interval.py:402–410  ·  view source on GitHub ↗
(self, other: object)

Source from the content-addressed store, hash-verified

400 return hash((self.start, self.end, self._absolute))
401
402 def __eq__(self, other: object) -> bool:
403 if isinstance(other, Interval):
404 return (self.start, self.end, self._absolute) == (
405 other.start,
406 other.end,
407 other._absolute,
408 )
409 else:
410 return self.as_duration() == other
411
412 def __ne__(self, other: object) -> bool:
413 return not self.__eq__(other)

Callers 1

__ne__Method · 0.95

Calls 1

as_durationMethod · 0.95

Tested by

no test coverage detected