Skip to content

Commit caefd4d

Browse files
committed
chess.engine._next_token() cosmetics
1 parent ec399d1 commit caefd4d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

chess/engine.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,8 @@ def _parse_xboard_post(line: str, root_board: chess.Board, selector: Info = INFO
26502650

26512651

26522652
def _next_token(line: str) -> tuple[str, str]:
2653-
"""Get the next token in a whitespace-delimited line of text.
2653+
"""
2654+
Get the next token in a whitespace-delimited line of text.
26542655
26552656
The result is returned as a 2-part tuple of strings.
26562657
@@ -2660,10 +2661,10 @@ def _next_token(line: str) -> tuple[str, str]:
26602661
If the input line is not empty and not completely whitespace, then
26612662
the first element of the returned tuple is a single word with
26622663
leading and trailing whitespace removed. The second element is the
2663-
unchanged rest of the line."""
2664-
2664+
unchanged rest of the line.
2665+
"""
26652666
parts = line.split(maxsplit=1)
2666-
return (parts[0] if parts else "", parts[1] if len(parts) == 2 else "")
2667+
return parts[0] if parts else "", parts[1] if len(parts) == 2 else ""
26672668

26682669

26692670
class BestMove:

0 commit comments

Comments
 (0)