From aaf5931b604381216e94154af05478f39cfa0ac4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 10 Feb 2022 14:53:12 +0100 Subject: [PATCH] ts_51_011: Fix type annotation for Tuple[int, int] Thanks to Vadim for pointing this out. Change-Id: I7ee1309331902bafab3c9fc6bc33ca713f8c7832 --- pySim/ts_51_011.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index a7f9f974..dd7b7881 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -325,6 +325,7 @@ EF_SST_map = { from pySim.utils import * from pySim.tlv import * +from typing import Tuple from struct import pack, unpack from construct import * from construct import Optional as COptional @@ -528,7 +529,7 @@ class EF_ServiceTable(TransparentEF): super().__init__(fid, sfid=sfid, name=name, desc=desc, size=size) self.table = table @staticmethod - def _bit_byte_offset_for_service(service:int) -> (int, int): + def _bit_byte_offset_for_service(service:int) -> Tuple[int, int]: i = service - 1 byte_offset = i//4 bit_offset = (i % 4) * 2