From 5c32ac2fb90fa6fdbf9303842848ee7aa571229a Mon Sep 17 00:00:00 2001 From: kingname Date: Sat, 24 Nov 2018 09:28:53 +0800 Subject: [PATCH] remove useless list comprehension. List Comprehensions is unnecessary here. --- fleep/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fleep/__init__.py b/fleep/__init__.py index b403394..a562e89 100644 --- a/fleep/__init__.py +++ b/fleep/__init__.py @@ -77,7 +77,7 @@ def get(obj): info[key][element[key]] = len(signature) for key in ["type", "extension", "mime"]: - info[key] = [element for element in sorted(info[key], key=info[key].get, reverse=True)] + info[key] = sorted(info[key], key=info[key].get, reverse=True) return Info(info["type"], info["extension"], info["mime"])