mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-25 14:58:33 +03:00
pySim/transport: Use newly-defined ResTuple type
Let's use the newly-added ResTuple type annotation rather than open-coding it everywhere. Change-Id: I122589e8aec4bf66dc2e86d7602ebecb771dcb93
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
import serial
|
||||
import time
|
||||
import os.path
|
||||
from typing import Optional, Tuple
|
||||
from typing import Optional
|
||||
|
||||
from pySim.exceptions import NoCardError, ProtocolError
|
||||
from pySim.transport import LinkBase
|
||||
from pySim.utils import h2b, b2h, Hexstr, SwHexstr
|
||||
from pySim.utils import h2b, b2h, Hexstr, ResTuple
|
||||
|
||||
|
||||
class SerialSimLink(LinkBase):
|
||||
@@ -185,7 +185,7 @@ class SerialSimLink(LinkBase):
|
||||
def _rx_byte(self):
|
||||
return self._sl.read()
|
||||
|
||||
def _send_apdu_raw(self, pdu: Hexstr) -> Tuple[Hexstr, SwHexstr]:
|
||||
def _send_apdu_raw(self, pdu: Hexstr) -> ResTuple:
|
||||
|
||||
pdu = h2b(pdu)
|
||||
data_len = pdu[4] # P3
|
||||
|
||||
Reference in New Issue
Block a user