mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
PEP8-ify
This commit is contained in:
parent
8beb613916
commit
fd40d992ad
@ -71,7 +71,6 @@ class ApplicationServiceApi(SimpleHttpClient):
|
|||||||
logger.warning("query_alias to %s threw exception %s", uri, ex)
|
logger.warning("query_alias to %s threw exception %s", uri, ex)
|
||||||
defer.returnValue(False)
|
defer.returnValue(False)
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def push_bulk(self, service, events):
|
def push_bulk(self, service, events):
|
||||||
events = self._serialize(events)
|
events = self._serialize(events)
|
||||||
@ -107,4 +106,3 @@ class ApplicationServiceApi(SimpleHttpClient):
|
|||||||
return [
|
return [
|
||||||
serialize_event(e, time_now, as_client_event=True) for e in events
|
serialize_event(e, time_now, as_client_event=True) for e in events
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -58,7 +58,6 @@ class DirectoryHandler(BaseHandler):
|
|||||||
servers
|
servers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def create_association(self, user_id, room_alias, room_id, servers=None):
|
def create_association(self, user_id, room_alias, room_id, servers=None):
|
||||||
# association creation for human users
|
# association creation for human users
|
||||||
@ -75,7 +74,6 @@ class DirectoryHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
yield self._create_association(room_alias, room_id, servers)
|
yield self._create_association(room_alias, room_id, servers)
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def create_appservice_association(self, service, room_alias, room_id,
|
def create_appservice_association(self, service, room_alias, room_id,
|
||||||
servers=None):
|
servers=None):
|
||||||
@ -127,7 +125,6 @@ class DirectoryHandler(BaseHandler):
|
|||||||
# if room_id:
|
# if room_id:
|
||||||
# yield self._update_room_alias_events(user_id, room_id)
|
# yield self._update_room_alias_events(user_id, room_id)
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_association(self, room_alias):
|
def get_association(self, room_alias):
|
||||||
room_id = None
|
room_id = None
|
||||||
|
@ -65,7 +65,7 @@ class RegisterRestServlet(AppServiceRestServlet):
|
|||||||
hs_token = app_service.hs_token
|
hs_token = app_service.hs_token
|
||||||
|
|
||||||
defer.returnValue((200, {
|
defer.returnValue((200, {
|
||||||
"hs_token": hs_token
|
"hs_token": hs_token
|
||||||
}))
|
}))
|
||||||
|
|
||||||
def _parse_namespace(self, target_ns, origin_ns, ns):
|
def _parse_namespace(self, target_ns, origin_ns, ns):
|
||||||
|
@ -97,7 +97,6 @@ class ApplicationServiceStore(SQLBaseStore):
|
|||||||
# allocate new ASes. It relies on the server admin inserting the AS
|
# allocate new ASes. It relies on the server admin inserting the AS
|
||||||
# token into the database manually.
|
# token into the database manually.
|
||||||
|
|
||||||
|
|
||||||
if not service.token or not service.url:
|
if not service.token or not service.url:
|
||||||
raise StoreError(400, "Token and url must be specified.")
|
raise StoreError(400, "Token and url must be specified.")
|
||||||
|
|
||||||
@ -186,7 +185,6 @@ class ApplicationServiceStore(SQLBaseStore):
|
|||||||
# TODO: The from_cache=False impl
|
# TODO: The from_cache=False impl
|
||||||
# TODO: This should be JOINed with the application_services_regex table.
|
# TODO: This should be JOINed with the application_services_regex table.
|
||||||
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _populate_cache(self):
|
def _populate_cache(self):
|
||||||
"""Populates the ApplicationServiceCache from the database."""
|
"""Populates the ApplicationServiceCache from the database."""
|
||||||
@ -244,4 +242,3 @@ class ApplicationServiceStore(SQLBaseStore):
|
|||||||
hs_token=service["hs_token"],
|
hs_token=service["hs_token"],
|
||||||
sender=service["sender"]
|
sender=service["sender"]
|
||||||
))
|
))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user