mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 21:54:55 -04:00
Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)
Ensure good comprehension hygiene using flake8-comprehensions.
This commit is contained in:
parent
272eee1ae1
commit
509e381afa
73 changed files with 251 additions and 276 deletions
|
@ -400,11 +400,11 @@ class RulesForRoom(object):
|
|||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.debug("Found members %r: %r", self.room_id, members.values())
|
||||
|
||||
interested_in_user_ids = set(
|
||||
interested_in_user_ids = {
|
||||
user_id
|
||||
for user_id, membership in itervalues(members)
|
||||
if membership == Membership.JOIN
|
||||
)
|
||||
}
|
||||
|
||||
logger.debug("Joined: %r", interested_in_user_ids)
|
||||
|
||||
|
@ -412,9 +412,9 @@ class RulesForRoom(object):
|
|||
interested_in_user_ids, on_invalidate=self.invalidate_all_cb
|
||||
)
|
||||
|
||||
user_ids = set(
|
||||
user_ids = {
|
||||
uid for uid, have_pusher in iteritems(if_users_with_pushers) if have_pusher
|
||||
)
|
||||
}
|
||||
|
||||
logger.debug("With pushers: %r", user_ids)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue