diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2021-02-16 16:32:34 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 22:32:34 +0000 |
commit | 0a00b7ff14890987f09112a2ae696c61001e6cf1 (patch) | |
tree | e662b6da7679b47276d8a865e3dc9b531d1cd9bd /synapse/handlers/groups_local.py | |
parent | Fix OIDC gitiea redirect URL. (#9404) (diff) | |
download | synapse-0a00b7ff14890987f09112a2ae696c61001e6cf1.tar.xz |
Update black, and run auto formatting over the codebase (#9381)
- Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
Diffstat (limited to 'synapse/handlers/groups_local.py')
-rw-r--r-- | synapse/handlers/groups_local.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/synapse/handlers/groups_local.py b/synapse/handlers/groups_local.py index 71f11ef94a..bfb95e3eee 100644 --- a/synapse/handlers/groups_local.py +++ b/synapse/handlers/groups_local.py @@ -146,8 +146,7 @@ class GroupsLocalWorkerHandler: async def get_users_in_group( self, group_id: str, requester_user_id: str ) -> JsonDict: - """Get users in a group - """ + """Get users in a group""" if self.is_mine_id(group_id): return await self.groups_server_handler.get_users_in_group( group_id, requester_user_id @@ -283,8 +282,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def create_group( self, group_id: str, user_id: str, content: JsonDict ) -> JsonDict: - """Create a group - """ + """Create a group""" logger.info("Asking to create group with ID: %r", group_id) @@ -314,8 +312,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def join_group( self, group_id: str, user_id: str, content: JsonDict ) -> JsonDict: - """Request to join a group - """ + """Request to join a group""" if self.is_mine_id(group_id): await self.groups_server_handler.join_group(group_id, user_id, content) local_attestation = None @@ -361,8 +358,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def accept_invite( self, group_id: str, user_id: str, content: JsonDict ) -> JsonDict: - """Accept an invite to a group - """ + """Accept an invite to a group""" if self.is_mine_id(group_id): await self.groups_server_handler.accept_invite(group_id, user_id, content) local_attestation = None @@ -408,8 +404,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def invite( self, group_id: str, user_id: str, requester_user_id: str, config: JsonDict ) -> JsonDict: - """Invite a user to a group - """ + """Invite a user to a group""" content = {"requester_user_id": requester_user_id, "config": config} if self.is_mine_id(group_id): res = await self.groups_server_handler.invite_to_group( @@ -434,8 +429,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def on_invite( self, group_id: str, user_id: str, content: JsonDict ) -> JsonDict: - """One of our users were invited to a group - """ + """One of our users were invited to a group""" # TODO: Support auto join and rejection if not self.is_mine_id(user_id): @@ -466,8 +460,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def remove_user_from_group( self, group_id: str, user_id: str, requester_user_id: str, content: JsonDict ) -> JsonDict: - """Remove a user from a group - """ + """Remove a user from a group""" if user_id == requester_user_id: token = await self.store.register_user_group_membership( group_id, user_id, membership="leave" @@ -501,8 +494,7 @@ class GroupsLocalHandler(GroupsLocalWorkerHandler): async def user_removed_from_group( self, group_id: str, user_id: str, content: JsonDict ) -> None: - """One of our users was removed/kicked from a group - """ + """One of our users was removed/kicked from a group""" # TODO: Check if user in group token = await self.store.register_user_group_membership( group_id, user_id, membership="leave" |