mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
mypy: Add specific codes to type: ignore annotations.
https://mypy.readthedocs.io/en/stable/error_codes.html Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
029bfb9fee
commit
f8c95cda51
@@ -73,7 +73,7 @@ class WebhooksCommonTestCase(ZulipTestCase):
|
||||
|
||||
last_message_id = self.get_last_message().id
|
||||
with self.assertRaisesRegex(JsonableError, "Malformed JSON"):
|
||||
my_webhook_no_notify(request) # type: ignore # mypy doesn't seem to apply the decorator
|
||||
my_webhook_no_notify(request) # type: ignore[call-arg] # mypy doesn't seem to apply the decorator
|
||||
|
||||
# First verify that without the setting, it doesn't send a PM to bot owner.
|
||||
msg = self.get_last_message()
|
||||
@@ -82,7 +82,7 @@ class WebhooksCommonTestCase(ZulipTestCase):
|
||||
|
||||
# Then verify that with the setting, it does send such a message.
|
||||
with self.assertRaisesRegex(JsonableError, "Malformed JSON"):
|
||||
my_webhook_notify(request) # type: ignore # mypy doesn't seem to apply the decorator
|
||||
my_webhook_notify(request) # type: ignore[call-arg] # mypy doesn't seem to apply the decorator
|
||||
msg = self.get_last_message()
|
||||
self.assertNotEqual(msg.id, last_message_id)
|
||||
self.assertEqual(msg.sender.email, self.notification_bot().email)
|
||||
|
||||
Reference in New Issue
Block a user