diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-05-02 02:29:52 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2021-05-02 20:22:15 +0000 |
commit | e8c34ca3e26069929ba0193f82549faf41eeb525 (patch) | |
tree | eac077c96edda04b133a61a9093b51fa03d97875 | |
parent | eb395867ab79f1e838d184ae8d9d3fc0c02f76c7 (diff) |
[pylint] Declare abstract LinkBase._send_apdu_raw() method as such
pySim/transport/__init__.py:86:15: E1101:
Instance of 'LinkBase' has no '_send_apdu_raw' member;
maybe 'send_apdu_raw'? (no-member)
Change-Id: I14fcdceca5d1e35491b6ad98f96b4276b69b2fc1
-rw-r--r-- | pySim/transport/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index d4f7f3a..05edc98 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -3,8 +3,9 @@ """ pySim: PCSC reader transport link base """ +import abc import argparse -from typing import Optional +from typing import Optional, Tuple from pySim.exceptions import * from pySim.construct import filter_dict @@ -36,13 +37,17 @@ class ApduTracer: pass -class LinkBase(object): +class LinkBase(abc.ABC): """Base class for link/transport to card.""" def __init__(self, sw_interpreter=None, apdu_tracer=None): self.sw_interpreter = sw_interpreter self.apdu_tracer = apdu_tracer + @abc.abstractmethod + def _send_apdu_raw(self, pdu:str) -> Tuple[str, str]: + """Implementation specific method for sending the PDU.""" + def set_sw_interpreter(self, interp): """Set an (optional) status word interpreter.""" self.sw_interpreter = interp |