Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 0ac77b3

Browse files
committed
Apply black formatting fixes
1 parent 156b366 commit 0ac77b3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

synapse/storage/databases/main/account_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
# Regex pattern for detecting a bridge bot (cached here for performance)
5959
BOT_PATTERN = re.compile(r"^@_.*_bot\:.*")
6060

61+
6162
class AccountDataWorkerStore(PushRulesWorkerStore, CacheInvalidationWorkerStore):
6263
def __init__(
6364
self,
@@ -534,7 +535,9 @@ def _add_account_data_for_user(
534535
if account_data_type == AccountDataTypes.IGNORED_USER_LIST:
535536
ignored_users = content.get("ignored_users", {})
536537
if isinstance(ignored_users, dict):
537-
content["ignored_users"] = {u: v for u, v in ignored_users.items() if not BOT_PATTERN.match(u)}
538+
content["ignored_users"] = {
539+
u: v for u, v in ignored_users.items() if not BOT_PATTERN.match(u)
540+
}
538541

539542
# no need to lock here as account_data has a unique constraint on
540543
# (user_id, account_data_type) so simple_upsert will retry if

synapse/storage/databases/main/roommember.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,11 +414,12 @@ def _get_number_joined_non_bot_users_in_room_txn(
414414
WHERE room_id = ? AND membership = ? AND state_key NOT LIKE ?
415415
"""
416416

417-
txn.execute(sql, (room_id, Membership.JOIN, '@_%_bot:%'))
417+
txn.execute(sql, (room_id, Membership.JOIN, "@_%_bot:%"))
418418
return [r[0] for r in txn][0]
419419

420420
return await self.db_pool.runInteraction(
421-
"get_number_joined_non_bot_users_in_room", _get_number_joined_non_bot_users_in_room_txn
421+
"get_number_joined_non_bot_users_in_room",
422+
_get_number_joined_non_bot_users_in_room_txn,
422423
)
423424

424425
@cached()

0 commit comments

Comments
 (0)