Transport: mark abstract methods with @abc.abstractmethod
parent
138af0da7a
commit
f9759d1024
|
@ -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 '''
|
||||
|
||||
|
|
Loading…
Reference in New Issue