Repository navigation
Automated Protos Update: Python wrappers - #1315
Merged
Naveed Jooma (njooma) merged 2 commits intoNov 23, 2026
Merged
Conversation
…4253384630bcd56df2cf8767fd819f45ae4e
github-actions
Bot
requested review from
nandini-swami and
Naveed Jooma (njooma)
and removed request for
a team
November 23, 2026 19:00
Naveed Jooma (njooma)
requested changes
Nov 23, 2026
Comment on lines
+11
to
+14
| @dataclass | ||
| class Properties: | ||
| is_battery_percent_supported: bool | ||
|
|
There was a problem hiding this comment.
Claude (@claude) make Properties a typealias to GetPropertiesResponse (similar to how we do it for camera)
Contributor
There was a problem hiding this comment.
Claude finished Naveed Jooma (@njooma)'s task in 2m 40s —— View job
Tasks
- Gather context (read camera pattern, read power_sensor files)
- Update
power_sensor.py: addTypeAlias, importGetPropertiesResponse, replace dataclass with type alias, fix docstring placement - Update
client.py: simplifyget_propertiesto return proto response directly - Update
service.py: send properties directly without reconstructingGetPropertiesResponse - Format and lint
- Commit and push
Done. Changes made in 3aef705:
power_sensor.py: Removed the@dataclass class Propertiesand replaced withProperties: "TypeAlias" = GetPropertiesResponse(matching the camera pattern). Also fixed the misplaced class docstring (it was after the dataclass, so not actually the class docstring).client.py:get_propertiesnow returns the protoresponsedirectly instead of constructing aPowerSensor.Propertiesdataclass wrapper.service.py:GetPropertiesnow sendspropertiesdirectly to the stream instead of doingGetPropertiesResponse(**properties.__dict__)(which is unnecessary now that the return type is already aGetPropertiesResponse).
The mock and tests required no changes — PowerSensor.Properties(is_battery_percent_supported=True) now calls GetPropertiesResponse(is_battery_percent_supported=True), which is valid, and test assertions on .is_battery_percent_supported still work.
Co-authored-by: Naveed Jooma <njooma@users.noreply.github.com>
Naveed Jooma (njooma)
approved these changes
Nov 23, 2026
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.
This is an auto-generated PR updating the Python wrappers for the proto changes in #1311.
This PR is stacked on top of
workflow/update-proto. Review and merge #1311 first; this PR will retarget tomainautomatically.