Skip to content

Commit

Permalink
lint and fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
sfoster1 committed Dec 10, 2024
1 parent b409e90 commit 8c6dcb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ def raise_on_error(self, response: str, request: str) -> None:
if self._alarm_keyword in lower:
raise AlarmResponse(port=self._port, response=response)

if self._error_keyword in lower:
if ErrorCodes.UNHANDLED_GCODE.value in lower:
if self._error_keyword.lower() in lower:
if ErrorCodes.UNHANDLED_GCODE.value.lower() in lower:
raise UnhandledGcode(
port=self._port, response=response, command=request
)
Expand Down
12 changes: 1 addition & 11 deletions api/src/opentrons/drivers/thermocycler/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def create(
name=port,
ack=TC_GEN2_SERIAL_ACK,
retry_wait_time_seconds=0.1,
error_keyword="error",
error_keyword="err",
alarm_keyword="alarm",
)

Expand Down Expand Up @@ -301,16 +301,6 @@ async def get_device_info(self) -> Dict[str, str]:
command=device_info, retries=DEFAULT_COMMAND_RETRIES
)

reset_reason = CommandBuilder(terminator=TC_COMMAND_TERMINATOR).add_gcode(
gcode=GCODE.GET_RESET_REASON
)
try:
await self._connection.send_command(
command=reset_reason, retries=DEFAULT_COMMAND_RETRIES
)
except UnhandledGcode:
pass

return utils.parse_device_information(device_info_string=response)

async def enter_programming_mode(self) -> None:
Expand Down
1 change: 0 additions & 1 deletion api/tests/opentrons/drivers/thermocycler/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,4 @@ async def test_device_info(
)

connection.send_command.assert_any_call(command=get_device_info, retries=3)
connection.send_command.assert_called_with(command=reset_reason, retries=3)
assert device_info == {"serial": "s", "model": "m", "version": "v"}

0 comments on commit 8c6dcb6

Please sign in to comment.