-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-5936: change return type for get readings #506
RSDK-5936: change return type for get readings #506
Conversation
Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm assuming you have tested with a real (or fake) sensor not just the python tests. just want to make sure changing the type didn't mess up something somewhere else
@@ -172,7 +175,7 @@ async def get_geometries( | |||
return [geometry for geometry in response.geometries] | |||
|
|||
|
|||
def sensor_readings_native_to_value(readings: Mapping[str, Any]) -> Mapping[str, Any]: | |||
def sensor_readings_native_to_value(readings: Mapping[str, Any]) -> Mapping[str, Value]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
The return type for the
get_readings()
calls should be ofMapping[str, viam.utils.ValueTypes]
rather thanMapping[str, Any]
.Tested with a fake movement sensor and power sensor.