Skip to content

Commit

Permalink
Fix lint issues from updated linter (#1370)
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <[email protected]>
  • Loading branch information
JeanChristopheMorinPerso authored Aug 8, 2022
1 parent 8847e90 commit 6cd4161
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion contrib/opentimelineio_contrib/adapters/extern_rv.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def execute_rv_commands(simplified_data, to_session):
rv_node_index = len(rv_nodes)

# make sure that node order lines up
assert(rv_node_index == node["node_index"])
assert rv_node_index == node["node_index"]

rv_nodes.append(new_node)
node["rv_node"] = new_node
Expand Down
12 changes: 6 additions & 6 deletions contrib/opentimelineio_contrib/adapters/hls_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def master_playlist_to_string(master_timeline):
hls_md_rejectlist = ['master_playlist']
for key in hls_md_rejectlist:
try:
del(header_tags[key])
del header_tags[key]
except KeyError:
pass

Expand Down Expand Up @@ -1158,7 +1158,7 @@ def master_playlist_to_string(master_timeline):
# Remove entries to not be included for I-Frame streams
for attr in I_FRAME_OMIT_ATTRS:
try:
del(attribute_list[attr])
del attribute_list[attr]
except KeyError:
pass

Expand Down Expand Up @@ -1316,7 +1316,7 @@ def _copy_HLS_metadata(self, media_track):

# Remove the version tag from the track metadata, we'll compute
# based on what we write out
del(self._playlist_tags[PLAYLIST_VERSION_TAG])
del self._playlist_tags[PLAYLIST_VERSION_TAG]

except KeyError:
pass
Expand All @@ -1325,7 +1325,7 @@ def _copy_HLS_metadata(self, media_track):
# playlist URIs
for key in ('uri', 'iframe_uri'):
try:
del(self._playlist_tags[key])
del self._playlist_tags[key]
except KeyError:
pass

Expand Down Expand Up @@ -1434,7 +1434,7 @@ def _add_entries_for_segment_from_fragments(
omit_hls_keys = omit_hls_keys or []
for key in omit_hls_keys:
try:
del(segment_tags[key])
del segment_tags[key]
except KeyError:
pass

Expand Down Expand Up @@ -1462,7 +1462,7 @@ def _add_entries_for_segment_from_fragments(
omit_hls_keys = omit_hls_keys or []
for key in omit_hls_keys:
try:
del(segment_tags[key])
del segment_tags[key]
except KeyError:
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def test_iframe_segment_size(self):

# Configure the playlist to be an iframe list
track_hls_metadata = timeline.tracks[0].metadata['HLS']
del(track_hls_metadata['EXT-X-INDEPENDENT-SEGMENTS'])
del track_hls_metadata['EXT-X-INDEPENDENT-SEGMENTS']
track_hls_metadata['EXT-X-I-FRAMES-ONLY'] = None

# Write out the playlist
Expand Down
8 changes: 4 additions & 4 deletions tests/test_fcp7_xml_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,10 +1287,10 @@ def test_roundtrip_mem2disk2mem(self):
# Before comparing, scrub ignorable metadata introduced in
# serialization (things like unique ids minted by the adapter)
# Since we seeded metadata for the generator, keep that metadata
del(new_timeline.metadata["fcp_xml"])
del new_timeline.metadata["fcp_xml"]
for child in new_timeline.tracks.each_child():
try:
del(child.metadata["fcp_xml"])
del child.metadata["fcp_xml"]
except KeyError:
pass

Expand All @@ -1299,7 +1299,7 @@ def test_roundtrip_mem2disk2mem(self):
child.media_reference, schema.GeneratorReference
)
if not is_generator:
del(child.media_reference.metadata["fcp_xml"])
del child.media_reference.metadata["fcp_xml"]
except (AttributeError, KeyError):
pass

Expand All @@ -1323,7 +1323,7 @@ def scrub_md_dicts(timeline):
def scrub_displayformat(md_dict):
for ignore_key in {"link"}:
try:
del(md_dict[ignore_key])
del md_dict[ignore_key]
except KeyError:
pass

Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugin_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def tearDown(self):
self.sys_patch.stop()
self.entry_patcher.stop()
if 'otio_mockplugin' in sys.modules:
del(sys.modules['otio_mockplugin'])
del sys.modules['otio_mockplugin']

def test_detect_plugin(self):
"""This manifest uses the plugin_manifest function"""
Expand Down

0 comments on commit 6cd4161

Please sign in to comment.