diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-20 08:56:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 08:56:23 -0400 |
commit | b3590614da7e3e17e75530a9d4808df17be9b127 (patch) | |
tree | c57aaff95611f6ca47fc9355602fac304c4d8a5a /synapse/handlers/room_member.py | |
parent | Fix remove_stale_pushers job on SQLite. (#10843) (diff) | |
download | synapse-b3590614da7e3e17e75530a9d4808df17be9b127.tar.xz |
Require type hints in the handlers module. (#10831)
Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler.
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r-- | synapse/handlers/room_member.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index 4390201641..a3e13c2270 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -225,7 +225,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): room_id: Optional[str], n_invites: int, update: bool = True, - ): + ) -> None: """Ratelimit more than one invite sent by the given requester in the given room. Args: @@ -249,7 +249,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): requester: Optional[Requester], room_id: Optional[str], invitee_user_id: str, - ): + ) -> None: """Ratelimit invites by room and by target user. If room ID is missing then we just rate limit by target user. @@ -386,7 +386,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): return result_event.event_id, result_event.internal_metadata.stream_ordering async def copy_room_tags_and_direct_to_room( - self, old_room_id, new_room_id, user_id + self, old_room_id: str, new_room_id: str, user_id: str ) -> None: """Copies the tags and direct room state from one room to another. @@ -1030,7 +1030,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): event: EventBase, context: EventContext, ratelimit: bool = True, - ): + ) -> None: """ Change the membership status of a user in a room. |