Address PR #1872 review feedback#2045
Merged
Merged
Conversation
- Fix ActionQueueSettings validation messages to reference actual field names (delay, max_actions) instead of old prefixed names - Fix Rexel docs: getting-started.md incorrectly showed UsernamePasswordCredentials instead of RexelOAuthCodeCredentials - Mark Rexel as supported in docs/index.md (auth strategy exists) - Improve response_handler message parsing readability by splitting walrus assignment into explicit steps
Contributor
There was a problem hiding this comment.
Pull request overview
This PR incorporates review feedback from PR #1872 by refining configuration error messaging, correcting Rexel documentation to match the implemented OAuth credentials, updating the Rexel support status in the docs, and improving response handler readability.
Changes:
- Simplified
check_responseerror parsing by replacing a walrus assignment with explicit intermediate variables. - Updated
ActionQueueSettings.validate()messages to reference the current field names (delay,max_actions). - Corrected Rexel documentation to use
RexelOAuthCodeCredentialsand marked Rexel as supported in the docs index.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pyoverkiz/response_handler.py | Minor readability refactor for error message normalization. |
| pyoverkiz/action_queue.py | Updates validation error messages for action queue settings. |
| docs/index.md | Moves Rexel out of the “unsupported auth” footnote list. |
| docs/getting-started.md | Fixes Rexel authentication docs to describe OAuth2 code flow and correct credentials class. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
26
to
31
| if self.delay <= 0: | ||
| raise ValueError(f"action_queue_delay must be positive, got {self.delay!r}") | ||
| raise ValueError(f"delay must be positive, got {self.delay!r}") | ||
| if self.max_actions < 1: | ||
| raise ValueError( | ||
| f"action_queue_max_actions must be at least 1, got {self.max_actions!r}" | ||
| f"max_actions must be at least 1, got {self.max_actions!r}" | ||
| ) |
Comment on lines
+156
to
+157
| Authentication to the Rexel cloud uses OAuth2 authorization code flow. | ||
| You need an authorization code and redirect URI obtained from the Rexel OAuth2 consent flow. |
- Remove Protocol inheritance from BaseAuthStrategy; structural subtyping satisfies the AuthStrategy protocol without explicit inheritance (fixes type system treating BaseAuthStrategy as a Protocol) - Convert OverkizClient constructor docstring from Sphinx :param: style to Google Args: style for project consistency
Inheriting from a Protocol does not make the subclass a Protocol — only direct inheritance from typing.Protocol does (PEP 544). The explicit inheritance clearly signals the contract BaseAuthStrategy implements and is correctly enforced by mypy.
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
Addresses actionable feedback from PR #1872 reviews (tetienne + Copilot):
delay,max_actions) instead of old prefixed names (action_queue_delay,action_queue_max_actions)getting-started.mdincorrectly showedUsernamePasswordCredentialsbut the auth factory requiresRexelOAuthCodeCredentials; updated with correct OAuth2 code flowdocs/index.mdmarked Rexel as unsupported but a fullRexelAuthStrategyexists; moved out of the unsupported footnoteItems already addressed in v2/main
get_event_loop→ alreadyget_running_loop/in exec path → already fixedStateDefinition→ already has properstr | Nonetyping with validationClientError__init_subclass__guard onUnknownEnumMixin→ already implementedItems intentionally skipped
DataType/ProductTypeenums missingUnknownEnumMixin— per @iMicknl's reply, keeping as-isTest plan
uv run pytest)