Skip to content

fix: add missing return value#782

Merged
Lash-L merged 1 commit intomainfrom
missing_clean_fluid_status
Mar 9, 2026
Merged

fix: add missing return value#782
Lash-L merged 1 commit intomainfrom
missing_clean_fluid_status

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Mar 9, 2026

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
roborock/data/v1/v1_containers.py 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
roborock/data/v1/v1_containers.py 91.94% <0.00%> (-0.19%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
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

Fixes StatusV2.clean_fluid_status in the v1 data model so it returns a CleanFluidStatus when the device reports a supported/non-zero value (aligning behavior with Status.clean_fluid_status).

Changes:

  • Add the missing return CleanFluidStatus(value) for the non-zero DSS-derived clean fluid status in StatusV2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 400 to 404
value = (self.dss >> 10) & 3
if value == 0:
return None # Feature not supported by this device
return CleanFluidStatus(value)
return None
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

There’s existing test coverage for DSS-derived status properties (tests/data/v1/test_v1_containers.py), but it currently only asserts the unsupported case where (dss >> 10) & 3 == 0. Since this bug fix changes behavior for non-zero values, please add a test case that sets a dss value with bits 10-11 = 1 or 2 and asserts clean_fluid_status returns the expected CleanFluidStatus.

Copilot uses AI. Check for mistakes.
@Lash-L Lash-L merged commit 3625590 into main Mar 9, 2026
11 of 12 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.

3 participants