Skip to content

Commit

Permalink
add docstring to normalise_ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichunjo committed Dec 20, 2024
1 parent f9b9200 commit a25d64a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion vardefunc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ def normalise_ranges(
*,
norm_dups: bool = True, ref_fps: Fraction | None = None
) -> list[Range] | list[tuple[int, int | None]]:
"""Modified version of lvsfunc.util.normalize_ranges following python slicing syntax"""
"""
Normalise ranges to a list of positive ranges following python slicing syntax `(inclusive, exclusive)`
:param clip: Input clip.
:param ranges: Frame range list of frame ranges, or range callbacks.
:param norm_dups: Normalise duplicated, defaults to True
:param ref_fps: FPS reference when passing an AudioNode, defaults to None
:return: Normalised ranges
"""
if isinstance(clip, vs.VideoNode):
num_frames = clip.num_frames
elif isinstance(clip, vs.AudioNode):
Expand Down

0 comments on commit a25d64a

Please sign in to comment.