Skip to content

Commit

Permalink
Added some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Jul 28, 2023
1 parent 006cec0 commit e2b9a20
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ptulsconv/docparser/doc_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def __init__(self, **kwargs):
self.markers = kwargs['markers']

def markers_timed(self) -> Iterator[Tuple['MarkerDescriptor', Fraction]]:
"""
Iterate each marker in the session with its respective time reference.
"""
for marker in self.markers:
marker_time = Fraction(marker.time_reference,
int(self.header.sample_rate))
Expand All @@ -28,6 +31,9 @@ def markers_timed(self) -> Iterator[Tuple['MarkerDescriptor', Fraction]]:

def tracks_clips(self) -> Iterator[Tuple['TrackDescriptor',
'TrackClipDescriptor']]:
"""
Iterate each track clip with its respective owning clip.
"""
for track in self.tracks:
for clip in track.clips:
yield track, clip
Expand All @@ -37,7 +43,10 @@ def track_clips_timed(self) -> Iterator[Tuple["TrackDescriptor",
Fraction, Fraction, Fraction]
]:
"""
:return: A Generator that yields track, clip, start time, finish time,
Iterate each track clip with its respective owning clip and timing
information.
:returns: A Generator that yields track, clip, start time, finish time,
and timestamp
"""
for track, clip in self.tracks_clips():
Expand Down

0 comments on commit e2b9a20

Please sign in to comment.