Skip to content

Commit

Permalink
Fix await docs (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
njooma authored Oct 15, 2024
1 parent d9852a6 commit c7a5f84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/viam/components/servo/servo.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def is_moving(self) -> bool:
my_servo = Servo.from_robot(robot=robot, name="my_servo")
print(my_servo.is_moving())
print(await my_servo.is_moving())
Returns:
Expand Down
2 changes: 1 addition & 1 deletion src/viam/resource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def do_command(
::
command = {"cmd": "test", "data1": 500}
result = component.do(command)
result = await component.do_command(command)
Args:
command (Mapping[str, ValueTypes]): The command to execute
Expand Down
6 changes: 3 additions & 3 deletions src/viam/robot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ async def get_cloud_metadata(self) -> GetCloudMetadataResponse:
::
metadata = machine.get_cloud_metadata()
metadata = await machine.get_cloud_metadata()
print(metadata.machine_id)
print(metadata.machine_part_id)
print(metadata.primary_org_id)
Expand All @@ -854,7 +854,7 @@ async def shutdown(self):
::
machine.shutdown()
await machine.shutdown()
Raises:
GRPCError: Raised with DeadlineExceeded status if shutdown request times out, or if
Expand Down Expand Up @@ -890,7 +890,7 @@ async def get_version(self) -> GetVersionResponse:
::
result = machine.get_version()
result = await machine.get_version()
print(result.platform)
print(result.version)
print(result.api_version)
Expand Down

0 comments on commit c7a5f84

Please sign in to comment.