From 438f711bb78c7d6048906b5fef66dcfe9755b960 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 22 Dec 2017 20:45:11 -0800 Subject: [PATCH] mypy: Amend typing of botserver test lib for strict-optional. --- zulip_botserver/tests/server_test_lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip_botserver/tests/server_test_lib.py b/zulip_botserver/tests/server_test_lib.py index c1a3380..18364c5 100644 --- a/zulip_botserver/tests/server_test_lib.py +++ b/zulip_botserver/tests/server_test_lib.py @@ -1,7 +1,7 @@ from unittest import TestCase import zulip_botserver.server import json -from typing import Any, List, Dict, Mapping +from typing import Any, List, Dict, Mapping, Optional class BotServerTestCase(TestCase): @@ -19,10 +19,10 @@ class BotServerTestCase(TestCase): message=dict(message={'key': "test message"}), check_success=False, ): - # type: (List[str], Dict[str, Any], Dict[str, Any], Dict[str, Any], str, Dict[str, Dict[str, Any]], bool) -> None + # type: (Optional[List[str]], Optional[Dict[str, Any]], Optional[Dict[str, Any]], Optional[Dict[str, Any]], str, Dict[str, Dict[str, Any]], bool) -> None if available_bots is not None: zulip_botserver.server.available_bots = available_bots - zulip_botserver.server.bots_config = bots_config + zulip_botserver.server.bots_config = bots_config # type: ignore # monkey-patching zulip_botserver.server.load_lib_modules() zulip_botserver.server.load_bot_handlers()