Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)

Ensure good comprehension hygiene using flake8-comprehensions.
This commit is contained in:
Patrick Cloke 2020-02-21 07:15:07 -05:00 committed by GitHub
parent 272eee1ae1
commit 509e381afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 251 additions and 276 deletions

View file

@ -526,12 +526,10 @@ class Mailer(object):
# If the room doesn't have a name, say who the messages
# are from explicitly to avoid, "messages in the Bob room"
sender_ids = list(
set(
[
notif_events[n["event_id"]].sender
for n in notifs_by_room[room_id]
]
)
{
notif_events[n["event_id"]].sender
for n in notifs_by_room[room_id]
}
)
member_events = yield self.store.get_events(
@ -558,12 +556,10 @@ class Mailer(object):
# If the reason room doesn't have a name, say who the messages
# are from explicitly to avoid, "messages in the Bob room"
sender_ids = list(
set(
[
notif_events[n["event_id"]].sender
for n in notifs_by_room[reason["room_id"]]
]
)
{
notif_events[n["event_id"]].sender
for n in notifs_by_room[reason["room_id"]]
}
)
member_events = yield self.store.get_events(