Small cleanups: dead code, version string, Loudmouth regex (#40, #41, #28)#57
Open
dbqpdb wants to merge 3 commits into
Open
Small cleanups: dead code, version string, Loudmouth regex (#40, #41, #28)#57dbqpdb wants to merge 3 commits into
dbqpdb wants to merge 3 commits into
Conversation
- Removed sillyDude() — was never called. - Removed run_him_if_i_am_not_the_main_file() and the trailing else branch that called it on every import; importing rlm is now silent (which the test suite already assumed). `runFromOutside.py` is the third item in #40 but is already covered by #49 (file deletion). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Float versioning breaks ordering (0.10 < 0.9 as floats) and 0.40 == 0.4. String is PEP 440-compatible and dunder name is convention for module version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two different patterns were being used for the same purpose: '\{.+?\}'
for findall, '\{.*?\}' for sub. Now compiled once as a raw string and
reused — same pattern in both call sites, no more SyntaxWarning about
the invalid \{ escape.
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
Three small, independent fixes that don't conflict with anything else in flight. Each is one commit.
f3cd387— Cleanup: remove dead code paths #40 dead code. RemovedsillyDude()andrun_him_if_i_am_not_the_main_file()+ the trailingelsebranch that called it on every import. (Third bullet in Cleanup: remove dead code paths #40,runFromOutside.py, is already covered by PR Quick bug bag: six independent small fixes (#29, #30, #31, #32, #33, #36) #49.)cd59d8a— Cleanup: store versionNumber as a string, not a float #41 version string.versionNumber = 0.40→__version__ = "0.40". Float versioning has both an equality issue (0.40 == 0.4) and an ordering issue (0.10 < 0.9as floats). Dunder name is conventional.2bab115— Fix typo, regularize RegEx #28 Loudmouth regex. The two regex calls inLoudmouth.propoundused slightly different patterns (\{.+?\}vs\{.*?\}). Now compiled once as a raw string and reused — same pattern in both call sites. Side effect: the\{invalid-escape SyntaxWarning is gone.Test plan
TestRLM().run_all_tests()— all 4 pass.import rlm; rlm.__version__returns"0.40".\{SyntaxWarning at import. (Tuple-assert SyntaxWarning still present — that's Bug: assert(cond, 'msg') tuple form is always truthy in TestRLM #32, fixed in PR Quick bug bag: six independent small fixes (#29, #30, #31, #32, #33, #36) #49.)Why these are bundled
All three are independent of the other six open PRs:
Loudmouth-adjacent area — not touched by Type hints for Board + Move; mypy CI workflow (advisory) (#46) #54/Inline docs: docstrings + comment cleanup for Board + Move (#47) #55/Types + docs follow-up: Player/Game/GameController/Piece subclasses (#46, #47) #56 (which are scoped to Board/Move/Player/Game/Piece).Loudmouth.propound, also outside the Type hints for Board + Move; mypy CI workflow (advisory) (#46) #54-56 scope.No rebase friction expected against any of the existing PRs.
Closes #40, #41, #28.
🤖 Generated with Claude Code