Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove unnecessary parentheses around return statements #5931

Merged
merged 9 commits into from
Aug 30, 2019
2 changes: 1 addition & 1 deletion tests/handlers/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,4 @@ def get_or_create_user(self, requester, localpart, displayname, password_hash=No
user, requester, displayname, by_admin=True
)

return (user_id, token)
return user_id, token
2 changes: 1 addition & 1 deletion tests/rest/client/v2_alpha/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def create_user(self):
added_at=now,
)
)
return (user_id, tok)
return user_id, tok

def test_manual_email_send_expired_account(self):
user_id = self.register_user("kermit", "monkey")
Expand Down
2 changes: 1 addition & 1 deletion tests/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def runInteraction(interaction, *args, **kwargs):
def get_clock():
clock = ThreadedMemoryReactorClock()
hs_clock = Clock(clock)
return (clock, hs_clock)
return clock, hs_clock


@attr.s(cmp=False)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_handler_for_request(self):

def _callback(request, **kwargs):
got_kwargs.update(kwargs)
return (200, kwargs)
return 200, kwargs

res = JsonResource(self.homeserver)
res.register_paths(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_events(self, event_ids, **kwargs):
}

def get_state_group_delta(self, name):
return (None, None)
return None, None

def register_events(self, events):
for e in events:
Expand Down Expand Up @@ -152,7 +152,7 @@ def walk(self):
return iter(self._events)

def get_leaves(self):
return (self._events[i] for i in self._leaves)
return self._events[i] for i in self._leaves
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved


class StateTestCase(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/util/test_ratelimitutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _await_resolution(reactor, d):
start_time = reactor.seconds()
while not d.called:
reactor.advance(0.01)
return (reactor.seconds() - start_time) * 1000
return reactor.seconds() - start_time * 1000


def build_rc_config(settings={}):
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def trigger(
args = [urlparse.unquote(u) for u in matcher.groups()]

(code, response) = yield func(mock_request, *args)
return (code, response)
return code, response
except CodeMessageException as e:
return (e.code, cs_error(e.msg, code=e.errcode))

Expand Down