Skip to content

Commit 836bf65

Browse files
shawnblakesleyMichelle Sintov
authored andcommitted
VIC-1802 Versioning tests (#88)
1 parent 1e81e85 commit 836bf65

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

anki_vector/camera.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def latest_image_id(self) -> int:
121121
raise Exception("Camera feed not open!") # TODO: Use a VectorException
122122
return self._latest_image_id
123123

124-
def init_camera_feed(self) -> None:
124+
def init_camera_feed(self) -> None:
125125
"""Begin camera feed task.
126126
127127
.. testcode::
@@ -159,8 +159,8 @@ def close_camera_feed(self) -> None:
159159
# the RPC should have had enough time to finish
160160
# which means we _should_ be in a good state.
161161
self.logger.info('Camera Feed closed, but streaming on'
162-
' robot remained enabled. This is unexpected.')
163-
break;
162+
' robot remained enabled. This is unexpected.')
163+
break
164164
self._camera_feed_task = None
165165

166166
async def _image_streaming_enabled(self) -> bool:

anki_vector/opengl/opengl_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def __init__(self, custom_object, is_fixed: bool):
556556
self.x_size_mm = custom_object.x_size_mm
557557
self.y_size_mm = custom_object.y_size_mm
558558
self.z_size_mm = custom_object.z_size_mm
559-
else:
559+
else:
560560
self.x_size_mm = custom_object.archetype.x_size_mm
561561
self.y_size_mm = custom_object.archetype.y_size_mm
562562
self.z_size_mm = custom_object.archetype.z_size_mm

anki_vector/opengl/opengl_viewer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ def _on_mouse_move(self, x, y):
316316

317317
left_button = self._is_mouse_down.get(GLUT_LEFT_BUTTON, False)
318318
# For laptop and other 1-button mouse users, treat 'x' key as a right mouse button too
319-
right_button = (self._is_mouse_down.get(GLUT_RIGHT_BUTTON, False) or
320-
self._is_key_pressed.get(b'x', False))
319+
right_button = (self._is_mouse_down.get(GLUT_RIGHT_BUTTON, False)
320+
or self._is_key_pressed.get(b'x', False))
321321

322322
MOUSE_SPEED_SCALAR = 1.0 # general scalar for all mouse movement sensitivity
323323
MOUSE_ROTATE_SCALAR = 0.025 # additional scalar for rotation sensitivity
@@ -591,7 +591,7 @@ def _render_world_frame(self, world_frame: opengl_vector.WorldRenderFrame):
591591
robot_view.display(robot_frame.pose, robot_frame.head_angle, robot_frame.lift_position)
592592

593593
if self.show_controls:
594-
self._draw_controls(world_frame.cube_connected(),world_frame.cube_connecting())
594+
self._draw_controls(world_frame.cube_connected(), world_frame.cube_connecting())
595595

596596
def _draw_controls(self, cube_connected, cube_connecting):
597597
try:

anki_vector/robot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ async def get_version_state(self) -> protocol.VersionStateResponse:
786786
get_version_state_request = protocol.VersionStateRequest()
787787
return await self.conn.grpc_interface.VersionState(get_version_state_request)
788788

789+
789790
class AsyncRobot(Robot):
790791
"""The AsyncRobot object is just like the Robot object, but allows multiple commands
791792
to be executed at the same time. To achieve this, all grpc function calls also

examples/tutorials/14_create_wall.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ def main():
4545
robot.behavior.go_to_pose(Pose(200, 0, 0, angle_z=degrees(0)), relative_to_robot=True)
4646
robot.world.delete_custom_objects()
4747

48+
4849
if __name__ == "__main__":
4950
main()

0 commit comments

Comments
 (0)