Skip to content

Commit

Permalink
Fix lint check
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Magnusson <[email protected]>
  • Loading branch information
semagnum committed Jul 10, 2024
1 parent ea0dd0c commit c0ce5ae
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/py-opentimelineio/opentimelineio/console/otiotool.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ def parse_arguments():
6. Inspect
Options such as --stats, --list-clips, --list-tracks, --list-media,
--verify-media, --list-markers, --verify-ranges, and --inspect will examine the OTIO and
print information to standard output.
--verify-media, --list-markers, --verify-ranges, and --inspect
will examine the OTIO and print information to standard output.
7. Output
Finally, if the "--output <filename>" option is specified, the resulting
Expand Down Expand Up @@ -402,7 +402,7 @@ def parse_arguments():
parser.add_argument(
"--verify-ranges",
action='store_true',
help="""Verify that each clip in a timeline has a source range
help="""Verify that each clip in a timeline has a source range
within the available range of media"""
)
parser.add_argument(
Expand Down Expand Up @@ -876,13 +876,18 @@ def summarize_timeline(list_tracks, list_clips, list_media, verify_media,
source = child.source_range
available = child.available_range()

starts_early = source.start_time.value < available.start_time.value
ends_late = (source.duration.value - source.start_time.value) > (available.duration.value - available.start_time.value)
src_start = source.start_time.value
src_dur = source.duration.value
avail_start = available.start_time.value
avail_dur = available.duration.value

starts_early = src_start < avail_start
ends_late = (src_dur - src_start) > (avail_dur - avail_start)
if starts_early or ends_late:
range_msg = "SOURCE MEDIA OUT OF BOUNDS"
else:
range_msg = "IN BOUNDS"
except Exception as e: # available range is, well, unavailable
except Exception: # available range is, well, unavailable
pass
print(" CLIP:", child.name, range_msg)
if list_media or verify_media:
Expand Down

0 comments on commit c0ce5ae

Please sign in to comment.