transport: add return type annotation to method __str__
The abstract class LinkBase has no return type annotation on its __str__ method. Related: OS#6210 Change-Id: I26d3d2714708dbe957704b60d17ba2afa325b2c4
This commit is contained in:
@@ -68,7 +68,7 @@ class LinkBase(abc.ABC):
|
||||
self.proactive_handler = proactive_handler
|
||||
|
||||
@abc.abstractmethod
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
"""Implementation specific method for printing an information to identify the device."""
|
||||
|
||||
@abc.abstractmethod
|
||||
|
||||
@@ -160,5 +160,5 @@ class CalypsoSimLink(LinkBase):
|
||||
|
||||
return b2h(data), b2h(sw)
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return "osmocon:%s" % (self._sock_path)
|
||||
|
||||
@@ -170,5 +170,5 @@ class ModemATCommandLink(LinkBase):
|
||||
log.debug('Command response: %s, %s', data, sw)
|
||||
return data, sw
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return "modem:%s" % self._device
|
||||
|
||||
@@ -93,5 +93,5 @@ class PcscSimLink(LinkBase):
|
||||
# Return value
|
||||
return i2h(data), i2h(sw)
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return "PCSC:%u[%s]" % (self._reader_number, self._reader)
|
||||
|
||||
@@ -237,5 +237,5 @@ class SerialSimLink(LinkBase):
|
||||
# Return value
|
||||
return b2h(data), b2h(sw)
|
||||
|
||||
def __str__(self):
|
||||
def __str__(self) -> str:
|
||||
return "serial:%s" % (self._sl.name)
|
||||
|
||||
Reference in New Issue
Block a user