mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-08-03 16:24:11 -04:00
Remove unnecessary parentheses around return statements (#5931)
Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
This commit is contained in:
parent
4fca313389
commit
4548d1f87e
81 changed files with 287 additions and 286 deletions
|
@ -54,7 +54,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
dir_handler = self.handlers.directory_handler
|
||||
res = yield dir_handler.get_association(room_alias)
|
||||
|
||||
return (200, res)
|
||||
return 200, res
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_PUT(self, request, room_alias):
|
||||
|
@ -87,7 +87,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
requester, room_alias, room_id, servers
|
||||
)
|
||||
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_DELETE(self, request, room_alias):
|
||||
|
@ -102,7 +102,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
service.url,
|
||||
room_alias.to_string(),
|
||||
)
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
except InvalidClientCredentialsError:
|
||||
# fallback to default user behaviour if they aren't an AS
|
||||
pass
|
||||
|
@ -118,7 +118,7 @@ class ClientDirectoryServer(RestServlet):
|
|||
"User %s deleted alias %s", user.to_string(), room_alias.to_string()
|
||||
)
|
||||
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
|
||||
|
||||
class ClientDirectoryListServer(RestServlet):
|
||||
|
@ -136,7 +136,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
if room is None:
|
||||
raise NotFoundError("Unknown room")
|
||||
|
||||
return (200, {"visibility": "public" if room["is_public"] else "private"})
|
||||
return 200, {"visibility": "public" if room["is_public"] else "private"}
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_PUT(self, request, room_id):
|
||||
|
@ -149,7 +149,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
requester, room_id, visibility
|
||||
)
|
||||
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_DELETE(self, request, room_id):
|
||||
|
@ -159,7 +159,7 @@ class ClientDirectoryListServer(RestServlet):
|
|||
requester, room_id, "private"
|
||||
)
|
||||
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
|
||||
|
||||
class ClientAppserviceDirectoryListServer(RestServlet):
|
||||
|
@ -193,4 +193,4 @@ class ClientAppserviceDirectoryListServer(RestServlet):
|
|||
requester.app_service.id, network_id, room_id, visibility
|
||||
)
|
||||
|
||||
return (200, {})
|
||||
return 200, {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue