MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / __lt__

Method __lt__

scenedetect/common.py:568–576  ·  view source on GitHub ↗
(self, other: "TimecodeLike")

Source from the content-addressed store, hash-verified

566 return self.frame_num != self._get_other_as_frames(other)
567
568 def __lt__(self, other: "TimecodeLike") -> bool:
569 if _compare_as_fixed(other, self):
570 return self.frame_num < other.frame_num
571 # For integer comparison, use frame numbers to avoid floating point precision issues.
572 if isinstance(other, int):
573 return self.frame_num < other
574 if isinstance(self._time, (Timecode, _Seconds)):
575 return self.seconds < self._get_other_as_seconds(other)
576 return self.frame_num < self._get_other_as_frames(other)
577
578 def __le__(self, other: "TimecodeLike") -> bool:
579 if _compare_as_fixed(other, self):

Callers

nothing calls this directly

Calls 3

_get_other_as_secondsMethod · 0.95
_get_other_as_framesMethod · 0.95
_compare_as_fixedFunction · 0.85

Tested by

no test coverage detected