Replace map calls with list comprehensions
This commit is contained in:
parent
b2c3967aeb
commit
df5fe3f5cb
@ -285,7 +285,7 @@ help - Gebe diese Hilfe aus'''
|
|||||||
await self._fetch_warnings()
|
await self._fetch_warnings()
|
||||||
|
|
||||||
# Flush the warnings to disk
|
# 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:
|
with open(self._warnings_file, 'w') as warnings_file:
|
||||||
warnings_file.write(json.dumps(ids))
|
warnings_file.write(json.dumps(ids))
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ help - Gebe diese Hilfe aus'''
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# Find new warnings and send the new ones
|
# 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:
|
for warning in self._warnings0:
|
||||||
if warning.id in ids:
|
if warning.id in ids:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user