Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(api): conditionally import usb dep #15247

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions api/src/opentrons/drivers/absorbance_reader/driver.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from __future__ import annotations

import asyncio
from typing import Dict, Optional, List
from typing import Dict, Optional, List, TYPE_CHECKING

from opentrons.drivers.types import AbsorbanceReaderLidStatus
from opentrons.drivers.absorbance_reader.abstract import AbstractAbsorbanceReaderDriver
from opentrons.drivers.rpi_drivers.types import USBPort
from .async_byonoy import AsyncByonoy

if TYPE_CHECKING:
from .async_byonoy import AsyncByonoy as AsyncByonoyType


class AbsorbanceReaderDriver(AbstractAbsorbanceReaderDriver):
Expand All @@ -23,7 +25,7 @@ async def create(
connection = await AsyncByonoy.create(port=port, usb_port=usb_port, loop=loop)
return cls(connection=connection)

def __init__(self, connection: AsyncByonoy) -> None:
def __init__(self, connection: AsyncByonoyType) -> None:
self._connection = connection

async def get_device_info(self) -> Dict[str, str]:
Expand Down
Loading