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:
Andrew Morgan 2019-08-30 16:28:26 +01:00 committed by GitHub
parent 4fca313389
commit 4548d1f87e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 287 additions and 286 deletions

View file

@ -48,7 +48,7 @@ class ProfileDisplaynameRestServlet(RestServlet):
if displayname is not None:
ret["displayname"] = displayname
return (200, ret)
return 200, ret
@defer.inlineCallbacks
def on_PUT(self, request, user_id):
@ -61,14 +61,14 @@ class ProfileDisplaynameRestServlet(RestServlet):
try:
new_name = content["displayname"]
except Exception:
return (400, "Unable to parse name")
return 400, "Unable to parse name"
yield self.profile_handler.set_displayname(user, requester, new_name, is_admin)
return (200, {})
return 200, {}
def on_OPTIONS(self, request, user_id):
return (200, {})
return 200, {}
class ProfileAvatarURLRestServlet(RestServlet):
@ -98,7 +98,7 @@ class ProfileAvatarURLRestServlet(RestServlet):
if avatar_url is not None:
ret["avatar_url"] = avatar_url
return (200, ret)
return 200, ret
@defer.inlineCallbacks
def on_PUT(self, request, user_id):
@ -110,14 +110,14 @@ class ProfileAvatarURLRestServlet(RestServlet):
try:
new_name = content["avatar_url"]
except Exception:
return (400, "Unable to parse name")
return 400, "Unable to parse name"
yield self.profile_handler.set_avatar_url(user, requester, new_name, is_admin)
return (200, {})
return 200, {}
def on_OPTIONS(self, request, user_id):
return (200, {})
return 200, {}
class ProfileRestServlet(RestServlet):
@ -150,7 +150,7 @@ class ProfileRestServlet(RestServlet):
if avatar_url is not None:
ret["avatar_url"] = avatar_url
return (200, ret)
return 200, ret
def register_servlets(hs, http_server):