Repository navigation
MAINT: make puzzled dispatch exhaustive (P311-03) - #3504
Closed
Slai.life (huong8373tt-beep) wants to merge 4 commits into
Closed
Slai.life (huong8373tt-beep) wants to merge 4 commits into
Slai.life (huong8373tt-beep) wants to merge 4 commits into
Conversation
5 of 25 tasks
Roman Lutz (romanlutz)
approved these changes
Oct 24, 2026
Roman Lutz (romanlutz)
enabled auto-merge
October 25, 2026 00:59
Richard Lundeen (richlundeen)
left a comment
Contributor
There was a problem hiding this comment.
I recommend closing this PR. The current dispatch already handles all three PuzzleType values, so this does not fix a current behavior bug. The new helper, generic Callable, and subprocess test that constructs source code and invokes ty add more maintenance than this change warrants. I would keep the simple dispatch and update it when a real enum extension needs it.
Reviewed with GitHub Copilot.
auto-merge was automatically disabled
October 25, 2026 08:28
Pull request was closed
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
PuzzleTypedispatch explicit for word-search, anagram, and crossword buildersassert_neverso a future enum member is rejected by type checking instead of falling through to the crossword builderPart of #3166 (P311-03 puzzle-builder dispatch).
Validation
uv run pytest tests/unit/converter/test_puzzled_converter.py -q --basetemp .pytest-tmp-final(145 passed)uv run ty check pyrit/converter/puzzled/puzzled_converter.py tests/unit/converter/test_puzzled_converter.pyuv run ruff format --check pyrit/converter/puzzled/puzzled_converter.py tests/unit/converter/test_puzzled_converter.pyuv run ruff check pyrit/converter/puzzled/puzzled_converter.py tests/unit/converter/test_puzzled_converter.pygit diff --checkDisclosure
Slai Agent Runtime assisted with analysis, reproduction, implementation, and test execution. The account owner authorized this contribution and is responsible for the submission.