mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 06:51:28 -04:00
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:
parent
5636e597c3
commit
0a00b7ff14
271 changed files with 2802 additions and 1713 deletions
|
@ -388,13 +388,19 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Check that room name changes increase the unread counter.
|
||||
self.helper.send_state(
|
||||
self.room_id, "m.room.name", {"name": "my super room"}, tok=self.tok2,
|
||||
self.room_id,
|
||||
"m.room.name",
|
||||
{"name": "my super room"},
|
||||
tok=self.tok2,
|
||||
)
|
||||
self._check_unread_count(1)
|
||||
|
||||
# Check that room topic changes increase the unread counter.
|
||||
self.helper.send_state(
|
||||
self.room_id, "m.room.topic", {"topic": "welcome!!!"}, tok=self.tok2,
|
||||
self.room_id,
|
||||
"m.room.topic",
|
||||
{"topic": "welcome!!!"},
|
||||
tok=self.tok2,
|
||||
)
|
||||
self._check_unread_count(2)
|
||||
|
||||
|
@ -404,7 +410,10 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Check that custom events with a body increase the unread counter.
|
||||
self.helper.send_event(
|
||||
self.room_id, "org.matrix.custom_type", {"body": "hello"}, tok=self.tok2,
|
||||
self.room_id,
|
||||
"org.matrix.custom_type",
|
||||
{"body": "hello"},
|
||||
tok=self.tok2,
|
||||
)
|
||||
self._check_unread_count(4)
|
||||
|
||||
|
@ -443,14 +452,18 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
|
|||
"""Syncs and compares the unread count with the expected value."""
|
||||
|
||||
channel = self.make_request(
|
||||
"GET", self.url % self.next_batch, access_token=self.tok,
|
||||
"GET",
|
||||
self.url % self.next_batch,
|
||||
access_token=self.tok,
|
||||
)
|
||||
|
||||
self.assertEqual(channel.code, 200, channel.json_body)
|
||||
|
||||
room_entry = channel.json_body["rooms"]["join"][self.room_id]
|
||||
self.assertEqual(
|
||||
room_entry["org.matrix.msc2654.unread_count"], expected_count, room_entry,
|
||||
room_entry["org.matrix.msc2654.unread_count"],
|
||||
expected_count,
|
||||
room_entry,
|
||||
)
|
||||
|
||||
# Store the next batch for the next request.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue