Fix (final) Bugbear violations (#9838)

This commit is contained in:
Jonathan de Jong 2021-04-20 12:50:49 +02:00 committed by GitHub
parent 71f0623de9
commit 495b214f4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 46 additions and 49 deletions

View file

@ -615,7 +615,7 @@ class RoomTestCase(unittest.HomeserverTestCase):
# Create 3 test rooms
total_rooms = 3
room_ids = []
for x in range(total_rooms):
for _ in range(total_rooms):
room_id = self.helper.create_room_as(
self.admin_user, tok=self.admin_user_tok
)
@ -679,7 +679,7 @@ class RoomTestCase(unittest.HomeserverTestCase):
# Create 5 test rooms
total_rooms = 5
room_ids = []
for x in range(total_rooms):
for _ in range(total_rooms):
room_id = self.helper.create_room_as(
self.admin_user, tok=self.admin_user_tok
)
@ -1577,7 +1577,7 @@ class JoinAliasRoomTestCase(unittest.HomeserverTestCase):
channel.json_body["event"]["event_id"], events[midway]["event_id"]
)
for i, found_event in enumerate(channel.json_body["events_before"]):
for found_event in channel.json_body["events_before"]:
for j, posted_event in enumerate(events):
if found_event["event_id"] == posted_event["event_id"]:
self.assertTrue(j < midway)
@ -1585,7 +1585,7 @@ class JoinAliasRoomTestCase(unittest.HomeserverTestCase):
else:
self.fail("Event %s from events_before not found" % j)
for i, found_event in enumerate(channel.json_body["events_after"]):
for found_event in channel.json_body["events_after"]:
for j, posted_event in enumerate(events):
if found_event["event_id"] == posted_event["event_id"]:
self.assertTrue(j > midway)