Update trait refresh method to return None#586
Merged
allenporter merged 5 commits intoPython-roborock:mainfrom Nov 15, 2025
Merged
Update trait refresh method to return None#586allenporter merged 5 commits intoPython-roborock:mainfrom
refresh method to return None#586allenporter merged 5 commits intoPython-roborock:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the refresh() method across all trait classes to return None instead of Self, eliminating an unused return value that was causing typing issues. The change simplifies the API by making it clear that refresh() modifies the trait instance in-place rather than returning a new or updated instance.
- Updated the base
refresh()method inV1TraitMixinto returnNone - Removed
return selfstatements from all trait implementations - Updated test to no longer capture the return value from
refresh()
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| roborock/devices/traits/v1/common.py | Base trait implementation updated to return None instead of Self, removed return statement |
| roborock/devices/traits/v1/network_info.py | Updated refresh() return type to None, removed Self import, added pylint disable comment |
| roborock/devices/traits/v1/home.py | Updated refresh() return type to None and removed return statements |
| roborock/devices/traits/v1/device_features.py | Updated refresh() return type to None, removed Self import, adjusted super().refresh() call, added pylint disable comment |
| roborock/devices/traits/v1/clean_summary.py | Updated refresh() return type to None, removed return statements, removed try-except block in _parse_clean_record_response() |
| tests/devices/traits/v1/test_rooms.py | Updated test to call refresh() without capturing return value, use trait instance directly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lash-L
reviewed
Nov 11, 2025
Lash-L
approved these changes
Nov 15, 2025
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.
The return value is currently not used and just causes typing issues. This is followup from discussion in #580