Skip to content

Update snapshots to the new format#1070

Merged
bouwew merged 4 commits into
mainfrom
fix-snapshots
May 18, 2026
Merged

Update snapshots to the new format#1070
bouwew merged 4 commits into
mainfrom
fix-snapshots

Conversation

@bouwew
Copy link
Copy Markdown
Contributor

@bouwew bouwew commented May 17, 2026

Summary by CodeRabbit

  • Tests

    • Updated test snapshots for Plugwise component entities to reflect internal data structure changes.
  • Chores

    • Added code quality directives to suppress lint warnings.

Review Change Stack

@bouwew bouwew requested a review from CoMPaTech May 17, 2026 08:51
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Warning

Rate limit exceeded

@bouwew has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 4 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09fc3333-478e-449a-a9dd-16116f8fa223

📥 Commits

Reviewing files that changed from the base of the PR and between 5d155af and 88d26af.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • custom_components/plugwise/config_flow.py
📝 Walkthrough

Walkthrough

This pull request adds a Pylint warning suppression directive to the config flow module and updates test snapshots across all Plugwise entity types to change the serialized aliases field representation from an empty set to a list containing None.

Changes

Snapshot aliases serialization and linting

Layer / File(s) Summary
Linting configuration
custom_components/plugwise/config_flow.py
Module-level Pylint directive (# pylint: disable=W) added to suppress warning messages; no functional logic changes.
Snapshot aliases serialization
tests/components/plugwise/snapshots/test_binary_sensor.ambr, test_button.ambr, test_climate.ambr, test_number.ambr, test_select.ambr, test_sensor.ambr, test_switch.ambr
EntityRegistryEntrySnapshot entries updated across all entity types to serialize the aliases field as list([None]) instead of set({}) or set({ ... }); state snapshot content unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • plugwise/plugwise-beta#960: Snapshot test data changes in sensor test fixtures may relate to the aliases serialization format updates shown here.
  • plugwise/plugwise-beta#906: Snapshot testing framework initialization that establishes the baseline for snapshot format expectations.

Suggested reviewers

  • CoMPaTech
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update snapshots to the new format' accurately describes the main change—updating multiple snapshot files to use a new representation format for the aliases field.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-snapshots

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
custom_components/plugwise/config_flow.py (1)

3-3: ⚡ Quick win

Narrow the pylint suppression instead of disabling the full warning category.

Line 3 disables all W* warnings for the module, which can hide new issues. Please replace this with explicit warning IDs (or the smallest possible inline suppression) tied to the actual false positives.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@custom_components/plugwise/config_flow.py` at line 3, The module currently
disables all pylint "W" warnings via "# pylint: disable=W"; narrow this by
running pylint on custom_components/plugwise/config_flow.py to identify the
specific warning IDs (e.g., W0613, W0611) and replace the module-level disable
with only those explicit IDs or move inline "# pylint: disable=<ID>" comments to
the exact function/method/class lines that are false positives (for example near
any function definitions or imports causing the warnings) so only the minimal
necessary warnings are suppressed while leaving the rest of the W category
enabled.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@custom_components/plugwise/config_flow.py`:
- Line 3: The module currently disables all pylint "W" warnings via "# pylint:
disable=W"; narrow this by running pylint on
custom_components/plugwise/config_flow.py to identify the specific warning IDs
(e.g., W0613, W0611) and replace the module-level disable with only those
explicit IDs or move inline "# pylint: disable=<ID>" comments to the exact
function/method/class lines that are false positives (for example near any
function definitions or imports causing the warnings) so only the minimal
necessary warnings are suppressed while leaving the rest of the W category
enabled.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca6bdeca-1a3b-4193-82eb-4464c13a7582

📥 Commits

Reviewing files that changed from the base of the PR and between c2395fd and 5d155af.

📒 Files selected for processing (8)
  • custom_components/plugwise/config_flow.py
  • tests/components/plugwise/snapshots/test_binary_sensor.ambr
  • tests/components/plugwise/snapshots/test_button.ambr
  • tests/components/plugwise/snapshots/test_climate.ambr
  • tests/components/plugwise/snapshots/test_number.ambr
  • tests/components/plugwise/snapshots/test_select.ambr
  • tests/components/plugwise/snapshots/test_sensor.ambr
  • tests/components/plugwise/snapshots/test_switch.ambr

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Error while testing for Development HA-core:

⚠️ Warning: Incompatible while testing against dev HA-core.
✔️ Success: No problem with testing against released HA-core.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Error while testing for Development HA-core:

⚠️ Warning: Incompatible while testing against dev HA-core.
✔️ Success: No problem with testing against released HA-core.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Error while testing for Development HA-core:

⚠️ Warning: Incompatible while testing against dev HA-core.
✔️ Success: No problem with testing against released HA-core.

@bouwew bouwew marked this pull request as ready for review May 17, 2026 09:18
@bouwew bouwew requested a review from a team as a code owner May 17, 2026 09:18
@bouwew bouwew merged commit 58323e1 into main May 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants