Skip to content

Commit 5dcd442

Browse files
committed
Simplify Board._repr_svg_()
1 parent 14a20f1 commit 5dcd442

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

chess/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,9 +3343,11 @@ def __repr__(self):
33433343

33443344
def _repr_svg_(self):
33453345
import chess.svg
3346-
lastmove = self.peek() if self.move_stack else None
3347-
check = self.king(self.turn) if self.is_check() else None
3348-
return chess.svg.board(board=self, lastmove=lastmove, check=check, size=400)
3346+
return chess.svg.board(
3347+
board=self,
3348+
size=400,
3349+
lastmove=self.peek() if self.move_stack else None,
3350+
check=self.king(self.turn) if self.is_check() else None)
33493351

33503352
def __eq__(self, board):
33513353
try:

0 commit comments

Comments
 (0)