Fix: PEP8 spacing in logic factory + tests for string time_resolution_minutes#306
Merged
MaStr merged 2 commits intofix-type-errorsfrom Mar 17, 2026
Merged
Fix: PEP8 spacing in logic factory + tests for string time_resolution_minutes#306MaStr merged 2 commits intofix-type-errorsfrom
MaStr merged 2 commits intofix-type-errorsfrom
Conversation
Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [302] Fix type error for interval_minutes
Fix: PEP8 spacing in logic factory + tests for string time_resolution_minutes
Mar 17, 2026
MaStr
approved these changes
Mar 17, 2026
MaStr
added a commit
that referenced
this pull request
Mar 17, 2026
* Transport time resolution as a proper parameter * Fix: PEP8 spacing in logic factory + tests for string time_resolution_minutes (#306) * Initial plan * Fix PEP8 spacing in logic.py and add string time_resolution tests Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.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.
Addresses review comments from PR #305. The logic factory had a PEP8 violation in its signature, and there were no tests covering the string→int coercion of
time_resolution_minutes(e.g. when provided by Home Assistant).Changes
src/batcontrol/logic/logic.pycreate_logicsignature:int,config→int, configtests/batcontrol/test_core.pyTestTimeResolutionStringwith parametrized coverage for'60'and'15'string inputs:test_string_time_resolution_initialises_without_error— assertsBatcontrol.__init__accepts string resolution and stores it asinttest_logic_factory_accepts_string_resolution_as_int— assertsLogicFactory.create_logicproduces aDefaultLogicwith the correctinterval_minutes🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.