Skip to content

Commit

Permalink
PEP8 style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
EwertonBello authored Dec 29, 2022
1 parent b2a1342 commit 54c830c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion m3u8/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def __init__(self, uri, stream_info, media, base_uri):
self.base_uri = base_uri

resolution = stream_info.get('resolution')
if resolution != None:
if resolution is not None:
resolution = resolution.strip('"')
values = resolution.split('x')
resolution_pair = (int(values[0]), int(values[1]))
Expand Down
8 changes: 4 additions & 4 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ def test_segment_envivio_scte35_attribute():

def test_segment_unknown_scte35_attribute():
obj = m3u8.M3U8(playlists.CUE_OUT_INVALID_PLAYLIST)
assert obj.segments[0].scte35 == None
assert obj.segments[0].scte35_duration == None
assert obj.segments[0].scte35 is None
assert obj.segments[0].scte35_duration is None

def test_segment_cue_out_no_duration():
obj = m3u8.M3U8(playlists.CUE_OUT_NO_DURATION_PLAYLIST)
Expand All @@ -231,7 +231,7 @@ def test_keys_on_clear_playlist():
obj = m3u8.M3U8(playlists.SIMPLE_PLAYLIST)

assert len(obj.keys) == 1
assert obj.keys[0] == None
assert obj.keys[0] is None


def test_keys_on_simple_encrypted_playlist():
Expand Down Expand Up @@ -1269,7 +1269,7 @@ def test_iframe_playlists_base_path_update():
obj = m3u8.M3U8(playlists.VARIANT_PLAYLIST_WITH_IFRAME_PLAYLISTS)

assert obj.iframe_playlists[0].uri == 'video-800k-iframes.m3u8'
assert obj.iframe_playlists[0].base_uri == None
assert obj.iframe_playlists[0].base_uri is None

obj.base_path = 'http://localhost/base_path'
obj.base_uri = 'http://localhost/base_uri'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ def test_cue_in_pops_scte35_data_and_duration():
assert data['segments'][9]['scte35'] == '/DAlAAAAAAAAAP/wFAUAAAABf+//wpiQkv4ARKogAAEBAQAAQ6sodg=='
assert data['segments'][9]['scte35_duration'] == '50'
assert data['segments'][10]['cue_in'] == False
assert data['segments'][10]['scte35'] == None
assert data['segments'][10]['scte35_duration'] == None
assert data['segments'][10]['scte35'] is None
assert data['segments'][10]['scte35_duration'] is None

def test_playlist_with_stable_variant_id():
data = m3u8.parse(playlists.VARIANT_PLAYLIST_WITH_STABLE_VARIANT_ID)
Expand Down

0 comments on commit 54c830c

Please sign in to comment.