Skip to content

Commit bbf718e

Browse files
committed
Remove "Creator" aliases for builders
1 parent d326a9d commit bbf718e

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Changes:
1616
no legal en-passant capture exists.
1717
* Circular SVG arrows now have a `circle` CSS class.
1818
* Superfluous dashes (-) in EPDs are no longer treated as opcodes.
19+
* Removed `GameCreator`, `HeaderCreator` and `BoardCreator` aliases for
20+
`{Game,Headers,Board}Builder`.
1921

2022
Bugfixes:
2123

chess/pgn.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,9 +1343,3 @@ def skip_game(handle: TextIO) -> bool:
13431343
Skip a game. Returns ``True`` if a game was found and skipped.
13441344
"""
13451345
return bool(read_game(handle, Visitor=SkipVisitor))
1346-
1347-
1348-
# TODO: Remove aliases
1349-
GameCreator = GameBuilder
1350-
HeaderCreator = HeadersBuilder
1351-
BoardCreator = BoardBuilder

test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,7 @@ def result(self):
23422342
self.assertEqual(trace, chess.pgn.read_game(pgn).accept(TraceVisitor()))
23432343

23442344
pgn.seek(0)
2345-
self.assertEqual(chess.Board(trace[-1]), chess.pgn.read_game(pgn, Visitor=chess.pgn.BoardCreator))
2345+
self.assertEqual(chess.Board(trace[-1]), chess.pgn.read_game(pgn, Visitor=chess.pgn.BoardBuilder))
23462346

23472347
def test_black_to_move(self):
23482348
game = chess.pgn.Game()
@@ -2527,7 +2527,7 @@ def test_subgame(self):
25272527
pgn = io.StringIO("1. d4 d5 (1... Nf6 2. c4 (2. Nf3 g6 3. g3))")
25282528
game = chess.pgn.read_game(pgn)
25292529
node = game.variations[0].variations[1]
2530-
subgame = node.accept_subgame(chess.pgn.GameCreator())
2530+
subgame = node.accept_subgame(chess.pgn.GameBuilder())
25312531
self.assertEqual(subgame.headers["FEN"], "rnbqkb1r/pppppppp/5n2/8/3P4/8/PPP1PPPP/RNBQKBNR w KQkq - 1 2")
25322532
self.assertEqual(subgame.variations[0].move, chess.Move.from_uci("c2c4"))
25332533
self.assertEqual(subgame.variations[1].move, chess.Move.from_uci("g1f3"))

0 commit comments

Comments
 (0)