From f9759d102459902da9699956f5f357d5131ac257 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 20 Jun 2022 18:48:17 +0700 Subject: [PATCH] Transport: mark abstract methods with @abc.abstractmethod --- transport.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transport.py b/transport.py index 90ad710..265191d 100644 --- a/transport.py +++ b/transport.py @@ -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 '''