From fd519252d67fa2fa920819b7a0ffa2f42181d220 Mon Sep 17 00:00:00 2001 From: Alena Volkova Date: Wed, 11 Oct 2017 19:20:22 -0400 Subject: [PATCH] mypy: zulip_bots: Fix errors in zulip_bots/zulip_bot_output.py. --- tools/run-mypy | 1 - zulip_bots/zulip_bots/zulip_bot_output.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/run-mypy b/tools/run-mypy index e5847a2..4c02e67 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -22,7 +22,6 @@ exclude = """ zulip/integrations/perforce/git_p4.py zulip_bots/zulip_bots/bots -zulip_bots/zulip_bots/zulip_bot_output.py zulip_botserver/tests/__init__.py zulip_botserver/zulip_botserver/server.py diff --git a/zulip_bots/zulip_bots/zulip_bot_output.py b/zulip_bots/zulip_bots/zulip_bot_output.py index 0160413..3aff555 100644 --- a/zulip_bots/zulip_bots/zulip_bot_output.py +++ b/zulip_bots/zulip_bots/zulip_bot_output.py @@ -8,6 +8,7 @@ import argparse import zulip_bots from six.moves import configparser +from typing import Any from mock import MagicMock, patch from zulip_bots.lib import StateHandler @@ -18,6 +19,7 @@ from zulip_bots.run import import_module_from_source current_dir = os.path.dirname(os.path.abspath(__file__)) def parse_args(): + # type: () -> argparse.Namespace description = ( "A tool to test a bot: given a provided message, provides the bot response.\n\n" 'Examples: %(prog)s xkcd 1\n' @@ -75,7 +77,7 @@ def main(): sys.exit(1) with patch('zulip.Client') as mock_client: - mock_bot_handler = ExternalBotHandler(mock_client, bot_dir) + mock_bot_handler = ExternalBotHandler(mock_client, bot_dir) # type: Any mock_bot_handler.send_reply = MagicMock() mock_bot_handler.send_message = MagicMock() mock_bot_handler.update_message = MagicMock()