Inline docs: docstrings + comment cleanup for Board + Move (#47)#55
Open
dbqpdb wants to merge 1 commit into
Open
Inline docs: docstrings + comment cleanup for Board + Move (#47)#55dbqpdb wants to merge 1 commit into
dbqpdb wants to merge 1 commit into
Conversation
Pass-through both classes converting docstrings to Google style (Args:/Returns:/Raises:), trimming verbose prose, and removing inline comments that restate well-named code. No behavior changes. Specific cleanups: - Class docstrings now mention the rank/file index flip and link #37 once at the top, instead of in every method's NB-comment. - Open design questions ("we'll need to decide as we carry on…") removed from docstrings — replaced with single references to the tracking issues (#37 for coords, #1 for the IDX_TO_FILE_DICT dup). - Known bugs (#29, #31, #33) get a one-line comment at the site so future readers know it's a known issue without reading docstrings. - Long `parse_move_without_game` docstring compressed; structure (args, return-dict keys, value tiers) reorganized into a scannable Google-style block. - `__str__`'s board-art docstring kept (it's a useful sample of the output) but no longer pretends to be a "what about this?" prompt. Net: 234 insertions, 260 deletions. All 4 TestRLM cases pass plus test_entered_move_processing. Follow-up pass will cover Piece + subclasses and Game / GameController. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First pass of #47, scoped to Board + Move (matching the order #46 used). Single commit. Annotation-only — no behavior changes; all 4
TestRLMcases pass plustest_entered_move_processing.What changed
Args:/Returns:/Raises:), with prose trimmed to a single-line summary plus structured sections where helpful.# Bug #X: ...comment at the site so a future reader doesn't have to chase the issue tracker. The actual fixes are in PR Quick bug bag: six independent small fixes (#29, #30, #31, #32, #33, #36) #49.parse_move_without_gamehad a ~25-line prose docstring — reorganized into a compact Args / Returns / value-tiers block.# get list of piece charactersnext tolist(self.board_array[...]),# default to standard starting position, etc.Diff shape
234 insertions, 260 deletions. Net negative.
Interactions with other open PRs
# Bug #N: ...comments at the buggy sites (Board.__setitem__line for Bug: Board.__setitem__ constructs Exception without raising it #31,square_name_to_array_idxsfor Bug: square_name_to_array_idxs uses setdefault, polluting class-level dict #33,Move.__eq__for Bug: Move.__eq__ compares new_en_passant_square to itself #29). When Quick bug bag: six independent small fixes (#29, #30, #31, #32, #33, #36) #49 merges, those comments need to go away. Easy follow-up in either PR's rebase.Out of scope
Pieceand subclasses,Game,GameController,Player,Lexicon,Loudmouth. Same suggested-order as #46 — follow-up passes.Closes #47 partially.
🤖 Generated with Claude Code