Fix flake8-comprehensions C407 Unnecessary list comprehension

This commit is contained in:
Labrys of Knossos 2019-04-05 14:35:23 -04:00
commit 169fcaae4a

View file

@ -67,10 +67,10 @@ def remote_dir(path):
def get_dir_size(input_path):
prepend = partial(os.path.join, input_path)
return sum([
return sum(
(os.path.getsize(f) if os.path.isfile(f) else get_dir_size(f))
for f in map(prepend, os.listdir(text_type(input_path)))
])
)
def remove_empty_folders(path, remove_root=True):