From df5fe3f5cb0cbcccb3ad64768e7b4bceac785464 Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Fri, 8 Jan 2021 17:00:25 +0100 Subject: [PATCH] Replace map calls with list comprehensions --- janine/janine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/janine/janine.py b/janine/janine.py index f426ee7..92085c5 100644 --- a/janine/janine.py +++ b/janine/janine.py @@ -285,7 +285,7 @@ help - Gebe diese Hilfe aus''' await self._fetch_warnings() # Flush the warnings to disk - ids = list(map(lambda x: x.id, self._warnings0)) + ids = [x.id for x in self._warnings0] with open(self._warnings_file, 'w') as warnings_file: warnings_file.write(json.dumps(ids)) @@ -307,7 +307,7 @@ help - Gebe diese Hilfe aus''' continue # Find new warnings and send the new ones - ids = map(lambda x: x.id, self._warnings1) + ids = [x.id for x in self._warnings1] for warning in self._warnings0: if warning.id in ids: continue