Run Black. (#5482)

This commit is contained in:
Amber Brown 2019-06-20 19:32:02 +10:00 committed by GitHub
parent 7dcf984075
commit 32e7c9e7f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
376 changed files with 9142 additions and 10388 deletions

View file

@ -24,6 +24,7 @@ class ServerNoticesSender(object):
"""A centralised place which sends server notices automatically when
Certain Events take place
"""
def __init__(self, hs):
"""
@ -32,7 +33,7 @@ class ServerNoticesSender(object):
"""
self._server_notices = (
ConsentServerNotices(hs),
ResourceLimitsServerNotices(hs)
ResourceLimitsServerNotices(hs),
)
@defer.inlineCallbacks
@ -43,9 +44,7 @@ class ServerNoticesSender(object):
user_id (str): mxid of user who synced
"""
for sn in self._server_notices:
yield sn.maybe_send_server_notice_to_user(
user_id,
)
yield sn.maybe_send_server_notice_to_user(user_id)
@defer.inlineCallbacks
def on_user_ip(self, user_id):
@ -58,6 +57,4 @@ class ServerNoticesSender(object):
# we check for notices to send to the user in on_user_ip as well as
# in on_user_syncing
for sn in self._server_notices:
yield sn.maybe_send_server_notice_to_user(
user_id,
)
yield sn.maybe_send_server_notice_to_user(user_id)