Skip to content

Address PR #1872 review feedback#2045

Merged
iMicknl merged 4 commits into
v2/mainfrom
fix/pr-1872-feedback
May 20, 2026
Merged

Address PR #1872 review feedback#2045
iMicknl merged 4 commits into
v2/mainfrom
fix/pr-1872-feedback

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented May 20, 2026

Summary

Addresses actionable feedback from PR #1872 reviews (tetienne + Copilot):

  • Action queue validation messages — error messages now reference actual field names (delay, max_actions) instead of old prefixed names (action_queue_delay, action_queue_max_actions)
  • Rexel docsgetting-started.md incorrectly showed UsernamePasswordCredentials but the auth factory requires RexelOAuthCodeCredentials; updated with correct OAuth2 code flow
  • Rexel support statusdocs/index.md marked Rexel as unsupported but a full RexelAuthStrategy exists; moved out of the unsupported footnote
  • Response handler readability — split walrus assignment into two explicit statements for clarity

Items already addressed in v2/main

  • Double-underscore methods → already single underscore
  • get_event_loop → already get_running_loop
  • Leading / in exec path → already fixed
  • StateDefinition → already has proper str | None typing with validation
  • Broad exception catch in Nexity → already narrowed to ClientError
  • __init_subclass__ guard on UnknownEnumMixin → already implemented

Items intentionally skipped

  • DataType/ProductType enums missing UnknownEnumMixin — per @iMicknl's reply, keeping as-is
  • Firmware method test coverage — out of scope for this PR

Test plan

  • All 419 tests pass (uv run pytest)
  • mypy passes on changed files
  • ruff check + format pass

- 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
Copilot AI review requested due to automatic review settings May 20, 2026 20:52
@iMicknl iMicknl requested a review from tetienne as a code owner May 20, 2026 20:52
@github-actions github-actions Bot added the bug Something isn't working label May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_response error 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 RexelOAuthCodeCredentials and 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 thread pyoverkiz/action_queue.py
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 thread docs/getting-started.md
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.
iMicknl added 2 commits May 20, 2026 22:56
- 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.
@iMicknl iMicknl merged commit 0a86438 into v2/main May 20, 2026
8 checks passed
@iMicknl iMicknl deleted the fix/pr-1872-feedback branch May 20, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants