mypy: Prohibit unreachable code.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-03-04 15:17:09 -08:00
parent 30f241a126
commit 717a549f4b
9 changed files with 15 additions and 11 deletions

View file

@ -15,7 +15,7 @@ class VirtualFsHandler:
def usage(self) -> str:
return get_help()
def handle_message(self, message: Dict[str, str], bot_handler: BotHandler) -> None:
def handle_message(self, message: Dict[str, Any], bot_handler: BotHandler) -> None:
command = message['content']
if command == "":
command = "help"

View file

@ -83,7 +83,7 @@ def exit_gracefully_if_zulip_config_is_missing(config_file: Optional[str]) -> No
sys.exit(1)
def exit_gracefully_if_bot_config_file_does_not_exist(bot_config_file: str) -> None:
def exit_gracefully_if_bot_config_file_does_not_exist(bot_config_file: Optional[str]) -> None:
if bot_config_file is None:
# This is a common case, just so succeed quietly. (Some
# bots don't have third party configuration.)