From 1928841256fa4c5866b75c8cd8915687d8da07a0 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Fri, 22 Dec 2017 11:02:15 -0800 Subject: [PATCH] mypy: Amend chess bot, to pass with strict-optional. --- zulip_bots/zulip_bots/bots/chess/chess.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/chess/chess.py b/zulip_bots/zulip_bots/bots/chess/chess.py index 7dafbf4..2e651d8 100644 --- a/zulip_bots/zulip_bots/bots/chess/chess.py +++ b/zulip_bots/zulip_bots/bots/chess/chess.py @@ -162,7 +162,7 @@ class ChessHandler(object): - bot_handler: The Zulip Bots bot handler object. - fen: The FEN string of the board. - Returns: `False` if the board didn't pass, or the board object itself + Returns: `None` if the board didn't pass, or the board object itself if it did. """ try: @@ -172,7 +172,7 @@ class ChessHandler(object): message, make_copied_wrong_response() ) - return False + return None return last_board @@ -417,7 +417,7 @@ class ChessHandler(object): self.engine ) - new_board_after_computer_move = copy.copy(last_board) + new_board_after_computer_move = copy.copy(last_board) # type: chess.Board new_board_after_computer_move.push(computer_move) if self.check_game_over(