Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Sep 26, 2023
1 parent 5f8ff21 commit 6eeebb5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@


def extract_motor_status_info(msg: _MotorStatusMoves) -> MotorPositionStatus:
"""Extract motor position status from CAN responses."""
move_ack: Optional[MoveCompleteAck] = None
if isinstance(msg, MoveCompleted) or isinstance(msg, TipActionResponse):
move_ack = MoveCompleteAck(msg.payload.ack_id.value)
Expand Down
1 change: 1 addition & 0 deletions hardware/opentrons_hardware/hardware_control/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class MotorPositionStatus:
move_ack: Optional[MoveCompleteAck] = None

def positions_only(self) -> Tuple[float, float]:
"""Returns motor and encoder positions as a tuple."""
return (
self.motor_position,
self.encoder_position,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests for the move scheduler."""
import pytest
from typing import List, Any, Tuple
from typing import List, Any
from numpy import float64, float32, int32
from mock import AsyncMock, call, MagicMock, patch
from opentrons_shared_data.errors.exceptions import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ def move_responder(

message_send_loopback.add_responder(move_responder)

position, encoder_position = await capacitive_probe(
status = await capacitive_probe(
mock_messenger, target_node, motor_node, distance, speed
)
assert position == 10 # this comes from the current_position_um above
assert encoder_position == 10
assert status.motor_position == 10 # this comes from the current_position_um above
assert status.encoder_position == 10
# this mock assert is annoying because something's __eq__ doesn't work
assert mock_sensor_threshold.call_args_list[0][0][0] == SensorThresholdInformation(
sensor=sensor_info,
Expand Down

0 comments on commit 6eeebb5

Please sign in to comment.