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

Method __le__

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

Source from the content-addressed store, hash-verified

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):
580 return self.frame_num <= other.frame_num
581 # For integer comparison, use frame numbers to avoid floating point precision issues.
582 if isinstance(other, int):
583 return self.frame_num <= other
584 if isinstance(self._time, (Timecode, _Seconds)):
585 return self.seconds <= self._get_other_as_seconds(other)
586 return self.frame_num <= self._get_other_as_frames(other)
587
588 def __gt__(self, other: "TimecodeLike") -> bool:
589 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