mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 14:06:06 -04:00
Replace iteritems/itervalues/iterkeys with native versions. (#7692)
This commit is contained in:
parent
2d11ea385c
commit
bd6dc17221
47 changed files with 184 additions and 263 deletions
|
@ -17,7 +17,7 @@
|
|||
import logging
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from six import iteritems, itervalues, string_types
|
||||
from six import string_types
|
||||
|
||||
from canonicaljson import encode_canonical_json, json
|
||||
|
||||
|
@ -246,7 +246,7 @@ class MessageHandler(object):
|
|||
"avatar_url": profile.avatar_url,
|
||||
"display_name": profile.display_name,
|
||||
}
|
||||
for user_id, profile in iteritems(users_with_profile)
|
||||
for user_id, profile in users_with_profile.items()
|
||||
}
|
||||
|
||||
def maybe_schedule_expiry(self, event):
|
||||
|
@ -988,7 +988,7 @@ class EventCreationHandler(object):
|
|||
|
||||
state_to_include_ids = [
|
||||
e_id
|
||||
for k, e_id in iteritems(current_state_ids)
|
||||
for k, e_id in current_state_ids.items()
|
||||
if k[0] in self.room_invite_state_types
|
||||
or k == (EventTypes.Member, event.sender)
|
||||
]
|
||||
|
@ -1002,7 +1002,7 @@ class EventCreationHandler(object):
|
|||
"content": e.content,
|
||||
"sender": e.sender,
|
||||
}
|
||||
for e in itervalues(state_to_include)
|
||||
for e in state_to_include.values()
|
||||
]
|
||||
|
||||
invitee = UserID.from_string(event.state_key)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue