refactor(client)!: keyword-only execute_action_group and typed gateway-selection error#2120
Merged
Conversation
…ed gateway-selection error Two breaking-change polish items before 2.0.0: - execute_action_group() is now keyword-only (actions/mode/label), matching the keyword-only constructor. Updated all callers and docs. - discover_gateways() / select_gateway() raise UnsupportedOperationError (in the BaseOverkizError hierarchy) instead of bare TypeError, so they are catchable alongside other Overkiz errors. Also clarified the open_local_pairing() docstring: the endpoint returns an empty dict on success but its shape under other conditions is unconfirmed, so the raw response is passed through as Any.
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
Final API-polish items before tagging 2.0.0. Both are breaking, so they're locked in now rather than after release.
execute_action_group()is keyword-only —actions/mode/labelmust be passed by name, matching the keyword-only constructor. Updated all callers, doc examples, and the migration guide.UnsupportedOperationError—discover_gateways()/select_gateway()previously raised a bareTypeError. They now raiseUnsupportedOperationError(in theBaseOverkizErrorhierarchy), so they're catchable alongside other Overkiz errors.Also clarified the
open_local_pairing()docstring. We probed the live endpoint against both Somfy and Atlantic — both return an empty{}on success — but the response shape under other conditions is unconfirmed, so the return type staysAnyand the raw response is passed through untouched (can be narrowed in a 2.x minor without breaking callers).Test plan
pytest— 518 passedruff check/ruff format— clean