Repository navigation
fix(cen): remove redundant log re-assignment in OWNScenarioPlusCommand builders - #106
Merged
GreenGrassBlueOcean merged 1 commit intoOct 11, 2026
Merged
Conversation
…d builders Address review feedback on PR #91 from @fedem95 and @GreenGrassBlueOcean: OWNScenarioPlusCommand.__init__ already initializes _human_readable_log to 'Scenario plus {self._where}: {self._action}.'. Re-assigning it in each builder (turn_on, turn_off, increase, decrease, stop) was redundant. Simplify builders to directly return cls(...), matching the pattern in OWNSceneCommand. Assert action, object, and human_readable_log on builder commands in tests/test_who25_scenario_plus.py.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
fedem95
approved these changes
Oct 11, 2026
fedem95
left a comment
Contributor
There was a problem hiding this comment.
Approved. The builders now rely on init for the human-readable log, and the tests verify the frame and parsed properties for all five commands. All checks pass.
GreenGrassBlueOcean
deleted the
fix/who25-scenario-plus-review-followups
branch
October 11, 2026 17:39
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
Follow-up to #91 addressing review feedback from @fedem95 (#91 review) and @GreenGrassBlueOcean (#91 review):
Changes
_human_readable_logre-assignment inOWNScenarioPlusCommand:OWNScenarioPlusCommand.__init__already initializes_human_readable_log = f"Scenario plus {self._where}: {self._action}.".The five classmethod builders (
turn_on,turn_off,increase,decrease,stop) now directly returncls(...), eliminating redundant re-assignments and matching the pattern used inOWNSceneCommand.tests/test_who25_scenario_plus.py:Extended
test_builders_send_the_ts10_framesto assertaction,object, andhuman_readable_logon each builder-constructed command.Verification
ruff check OWNd tests setup.py scripts: cleanmypy OWNd tests/typing: 0 issues (26 files)python scripts/verify_library_standards.py: all checks passpython scripts/sync_documentation.py --check: in sync (exit 0)pytest tests/: 1,311 passed