mirror of https://github.com/zulip/zulip.git
ruff: Fix C405 Unnecessary `list` literal (rewrite as a `set` literal).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
033d2615f6
commit
9e53f0c756
|
@ -107,7 +107,7 @@ class GitterImporter(ZulipTestCase):
|
|||
messages["zerver_usermessage"], "user_profile"
|
||||
)
|
||||
self.assertEqual(
|
||||
set([user_should_not_be_long_term_idle["id"]]), exported_usermessage_userprofile
|
||||
{user_should_not_be_long_term_idle["id"]}, exported_usermessage_userprofile
|
||||
)
|
||||
exported_usermessage_message = self.get_set(messages["zerver_usermessage"], "message")
|
||||
self.assertEqual(exported_usermessage_message, exported_messages_id)
|
||||
|
|
|
@ -678,13 +678,13 @@ class RealmImportExportTest(ExportFile):
|
|||
.values_list("id", flat=True)
|
||||
)
|
||||
|
||||
exported_msg_ids = (
|
||||
set(public_stream_message_ids)
|
||||
| set(private_stream_message_ids)
|
||||
| set([stream_b_second_message_id])
|
||||
| set(exported_pm_ids)
|
||||
| set(exported_huddle_ids)
|
||||
)
|
||||
exported_msg_ids = {
|
||||
*public_stream_message_ids,
|
||||
*private_stream_message_ids,
|
||||
stream_b_second_message_id,
|
||||
*exported_pm_ids,
|
||||
*exported_huddle_ids,
|
||||
}
|
||||
self.assertEqual(self.get_set(data["zerver_message"], "id"), exported_msg_ids)
|
||||
|
||||
self.assertNotIn(stream_b_first_message_id, exported_msg_ids)
|
||||
|
|
Loading…
Reference in New Issue