Transport: mark abstract methods with @abc.abstractmethod
This commit is contained in:
parent
138af0da7a
commit
f9759d1024
|
@ -30,15 +30,19 @@ class TransportIOError(Exception):
|
||||||
class Transport(abc.ABC):
|
class Transport(abc.ABC):
|
||||||
''' Abstract transport layer for DebugMux '''
|
''' Abstract transport layer for DebugMux '''
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def connect(self, opts: dict) -> None:
|
def connect(self, opts: dict) -> None:
|
||||||
''' Establish connection to the target and enter DebugMux mode '''
|
''' Establish connection to the target and enter DebugMux mode '''
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def disconnect(self) -> None:
|
def disconnect(self) -> None:
|
||||||
''' Escape DebugMux mode and terminate connection with the target '''
|
''' Escape DebugMux mode and terminate connection with the target '''
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def write(self, data: bytes) -> int:
|
def write(self, data: bytes) -> int:
|
||||||
''' Write the given data bytes '''
|
''' Write the given data bytes '''
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def read(self, length: int = 0) -> bytes:
|
def read(self, length: int = 0) -> bytes:
|
||||||
''' Read the given number of bytes '''
|
''' Read the given number of bytes '''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue