From 48587d295c8671f02bab208338591ea3127ece5c Mon Sep 17 00:00:00 2001 From: j Date: Sat, 7 Jan 2017 16:50:33 +0100 Subject: [PATCH] format --- pandora/item/timelines.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora/item/timelines.py b/pandora/item/timelines.py index c7e587fcc..ba944dc93 100644 --- a/pandora/item/timelines.py +++ b/pandora/item/timelines.py @@ -116,11 +116,11 @@ def join_tiles(source_paths, durations, target_path): offset = 0 for i, path in enumerate(source_paths): file_info = map(get_file_info, os.listdir(path)) - file_info = filter(lambda x: x != None, file_info) + file_info = filter(lambda x: x is not None, file_info) files = {} for info in sorted(file_info, key=lambda x: x['index']): mode = info['mode'] - if not mode in files: + if mode not in files: files[mode] = [] files[mode].append(path + info['file']) if i: @@ -223,9 +223,9 @@ def split_tiles(path, paths, durations): print(file_name, mode) split = re.split('[a-z]+', file_name[8 + len(mode):-4]) height, index = map(lambda x: int(x) if len(x) else -1, split) - if not mode in tiles: + if mode not in tiles: tiles[mode] = {} - if not height in tiles[mode]: + if height not in tiles[mode]: tiles[mode][height] = 0 if index + 1 > tiles[mode][height]: tiles[mode][height] = index + 1