Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Add Backend as superclass of SerialHardwareBackend #595

Merged
merged 2 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions j5/backends/hardware/j5/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from serial import Serial, SerialException, SerialTimeoutException
from typing_extensions import Protocol

from j5.backends import BackendMeta, CommunicationError
from j5.backends import Backend, BackendMeta, CommunicationError
from j5.boards import Board


Expand Down Expand Up @@ -43,7 +43,7 @@ def write(self, data: bytes) -> int:
... # pragma: nocover


class SerialHardwareBackend(metaclass=BackendMeta):
class SerialHardwareBackend(Backend, metaclass=BackendMeta):
"""An abstract class for creating backends that use USB serial communication."""

DEFAULT_TIMEOUT: timedelta = timedelta(milliseconds=250)
Expand Down
2 changes: 1 addition & 1 deletion j5/backends/hardware/sb/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def discover(
boards.add(
SBArduinoBoard(
port.serial_number,
cls(port.device, serial_class), # type: ignore
cls(port.device, serial_class),
),
)

Expand Down