@@ -143,9 +143,9 @@ async def get_room_data(
143143 elif membership == Membership .LEAVE :
144144 key = (event_type , state_key )
145145 # If the membership is not JOIN, then the event ID should exist.
146- assert membership_event_id is not None , (
147- "check_user_in_room_or_world_readable returned invalid data"
148- )
146+ assert (
147+ membership_event_id is not None
148+ ), "check_user_in_room_or_world_readable returned invalid data"
149149 room_state = await self ._state_storage_controller .get_state_for_events (
150150 [membership_event_id ], StateFilter .from_types ([key ])
151151 )
@@ -242,9 +242,9 @@ async def get_state_events(
242242 room_state = await self .store .get_events (state_ids .values ())
243243 elif membership == Membership .LEAVE :
244244 # If the membership is not JOIN, then the event ID should exist.
245- assert membership_event_id is not None , (
246- "check_user_in_room_or_world_readable returned invalid data"
247- )
245+ assert (
246+ membership_event_id is not None
247+ ), "check_user_in_room_or_world_readable returned invalid data"
248248 room_state_events = (
249249 await self ._state_storage_controller .get_state_for_events (
250250 [membership_event_id ], state_filter = state_filter
@@ -1267,14 +1267,12 @@ async def create_new_client_event(
12671267 # Allow an event to have empty list of prev_event_ids
12681268 # only if it has auth_event_ids.
12691269 or auth_event_ids
1270- ), (
1271- "Attempting to create a non-m.room.create event with no prev_events or auth_event_ids"
1272- )
1270+ ), "Attempting to create a non-m.room.create event with no prev_events or auth_event_ids"
12731271 else :
12741272 # we now ought to have some prev_events (unless it's a create event).
1275- assert builder . type == EventTypes . Create or prev_event_ids , (
1276- "Attempting to create a non-m.room.create event with no prev_events"
1277- )
1273+ assert (
1274+ builder . type == EventTypes . Create or prev_event_ids
1275+ ), "Attempting to create a non-m.room.create event with no prev_events"
12781276
12791277 if for_batch :
12801278 assert prev_event_ids is not None
0 commit comments