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
`](80d6dc9783/docs/code_style.md)
 - Update `code_style.md` docs around installing black to use the correct version
This commit is contained in:
Eric Eastwood 2021-02-16 16:32:34 -06:00 committed by GitHub
parent 5636e597c3
commit 0a00b7ff14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
271 changed files with 2802 additions and 1713 deletions

View file

@ -131,7 +131,9 @@ class TestCreateAlias(unittest.HomeserverTestCase):
"""A user can create an alias for a room they're in."""
self.get_success(
self.handler.create_association(
create_requester(self.test_user), self.room_alias, self.room_id,
create_requester(self.test_user),
self.room_alias,
self.room_id,
)
)
@ -143,7 +145,9 @@ class TestCreateAlias(unittest.HomeserverTestCase):
self.get_failure(
self.handler.create_association(
create_requester(self.test_user), self.room_alias, other_room_id,
create_requester(self.test_user),
self.room_alias,
other_room_id,
),
synapse.api.errors.SynapseError,
)
@ -156,7 +160,9 @@ class TestCreateAlias(unittest.HomeserverTestCase):
self.get_success(
self.handler.create_association(
create_requester(self.admin_user), self.room_alias, other_room_id,
create_requester(self.admin_user),
self.room_alias,
other_room_id,
)
)
@ -275,8 +281,7 @@ class TestDeleteAlias(unittest.HomeserverTestCase):
class CanonicalAliasTestCase(unittest.HomeserverTestCase):
"""Test modifications of the canonical alias when delete aliases.
"""
"""Test modifications of the canonical alias when delete aliases."""
servlets = [
synapse.rest.admin.register_servlets,
@ -317,7 +322,10 @@ class CanonicalAliasTestCase(unittest.HomeserverTestCase):
def _set_canonical_alias(self, content):
"""Configure the canonical alias state on the room."""
self.helper.send_state(
self.room_id, "m.room.canonical_alias", content, tok=self.admin_user_tok,
self.room_id,
"m.room.canonical_alias",
content,
tok=self.admin_user_tok,
)
def _get_canonical_alias(self):