From cf0a67cfabc151d5c80c6e9c3e9e4ab504f5cd9e Mon Sep 17 00:00:00 2001 From: vegano1 Date: Tue, 6 Aug 2024 12:04:33 -0400 Subject: [PATCH] cast Version --- api/src/opentrons/hardware_control/modules/mod_abc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/opentrons/hardware_control/modules/mod_abc.py b/api/src/opentrons/hardware_control/modules/mod_abc.py index 04a8b6ff5dc..509eb2d4b06 100644 --- a/api/src/opentrons/hardware_control/modules/mod_abc.py +++ b/api/src/opentrons/hardware_control/modules/mod_abc.py @@ -2,7 +2,7 @@ import asyncio import logging import re -from typing import ClassVar, Mapping, Optional, TypeVar +from typing import ClassVar, Mapping, Optional, TypeVar, cast from packaging.version import InvalidVersion, parse, Version from opentrons.config import IS_ROBOT, ROBOT_FIRMWARE_DIR from opentrons.drivers.rpi_drivers.types import USBPort @@ -31,7 +31,7 @@ def parse_fw_version(version: str) -> Version: raise InvalidVersion() except InvalidVersion: device_version = parse("v0.0.0") - return device_version + return cast(Version, device_version) class AbstractModule(abc.ABC):