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

Function _compare_as_fixed

scenedetect/common.py:777–780  ·  view source on GitHub ↗

Type guard: True (and narrows `other` to `FrameTimecode`) iff both timecodes have a known framerate, in which case frame-based comparison is exact and preferred over float seconds.

(other: ty.Any, base: FrameTimecode)

Source from the content-addressed store, hash-verified

775
776
777def _compare_as_fixed(other: ty.Any, base: FrameTimecode) -> ty.TypeGuard[FrameTimecode]:
778 """Type guard: True (and narrows `other` to `FrameTimecode`) iff both timecodes have a known
779 framerate, in which case frame-based comparison is exact and preferred over float seconds."""
780 return base._rate is not None and isinstance(other, FrameTimecode) and other._rate is not None

Callers 6

__eq__Method · 0.85
__ne__Method · 0.85
__lt__Method · 0.85
__le__Method · 0.85
__gt__Method · 0.85
__ge__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected