Transport: mark abstract methods with @abc.abstractmethod

This commit is contained in:
Vadim Yanitskiy 2022-06-20 18:48:17 +07:00
parent 138af0da7a
commit f9759d1024
1 changed files with 4 additions and 0 deletions

View File

@ -30,15 +30,19 @@ class TransportIOError(Exception):
class Transport(abc.ABC):
''' Abstract transport layer for DebugMux '''
@abc.abstractmethod
def connect(self, opts: dict) -> None:
''' Establish connection to the target and enter DebugMux mode '''
@abc.abstractmethod
def disconnect(self) -> None:
''' Escape DebugMux mode and terminate connection with the target '''
@abc.abstractmethod
def write(self, data: bytes) -> int:
''' Write the given data bytes '''
@abc.abstractmethod
def read(self, length: int = 0) -> bytes:
''' Read the given number of bytes '''