mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:24:54 -04:00
Replace returnValue with return (#5736)
This commit is contained in:
parent
18a466b84e
commit
4806651744
177 changed files with 1359 additions and 1513 deletions
|
@ -145,7 +145,7 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
for service in as_list:
|
||||
if service.id == res["as_id"]:
|
||||
services.append(service)
|
||||
defer.returnValue(services)
|
||||
return services
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_appservice_state(self, service):
|
||||
|
@ -164,9 +164,9 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
desc="get_appservice_state",
|
||||
)
|
||||
if result:
|
||||
defer.returnValue(result.get("state"))
|
||||
return result.get("state")
|
||||
return
|
||||
defer.returnValue(None)
|
||||
return None
|
||||
|
||||
def set_appservice_state(self, service, state):
|
||||
"""Set the application service state.
|
||||
|
@ -298,15 +298,13 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
)
|
||||
|
||||
if not entry:
|
||||
defer.returnValue(None)
|
||||
return None
|
||||
|
||||
event_ids = json.loads(entry["event_ids"])
|
||||
|
||||
events = yield self.get_events_as_list(event_ids)
|
||||
|
||||
defer.returnValue(
|
||||
AppServiceTransaction(service=service, id=entry["txn_id"], events=events)
|
||||
)
|
||||
return AppServiceTransaction(service=service, id=entry["txn_id"], events=events)
|
||||
|
||||
def _get_last_txn(self, txn, service_id):
|
||||
txn.execute(
|
||||
|
@ -360,7 +358,7 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
|
||||
events = yield self.get_events_as_list(event_ids)
|
||||
|
||||
defer.returnValue((upper_bound, events))
|
||||
return (upper_bound, events)
|
||||
|
||||
|
||||
class ApplicationServiceTransactionStore(ApplicationServiceTransactionWorkerStore):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue