From 530bf73cbcd7af3bfdf957d22e13690de935dc1a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 4 Feb 2024 23:16:18 +0100 Subject: [PATCH] pylint: esim/saip/oid.py pySim/esim/saip/oid.py:30:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) pySim/esim/saip/oid.py:46:11: C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck) Change-Id: I65c9cd1bb2b6a1747a7fbb25052adc75605bc870 --- pySim/esim/saip/oid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pySim/esim/saip/oid.py b/pySim/esim/saip/oid.py index e1892bec..238e49f7 100644 --- a/pySim/esim/saip/oid.py +++ b/pySim/esim/saip/oid.py @@ -27,7 +27,7 @@ class OID: return '.'.join([str(x) for x in intlist]) def __init__(self, initializer: Union[List[int], str]): - if type(initializer) == str: + if isinstance(initializer, str): self.intlist = self.intlist_from_str(initializer) else: self.intlist = initializer @@ -43,7 +43,7 @@ class eOID(OID): """OID helper for TCA eUICC prefix""" __prefix = [2,23,143,1] def __init__(self, initializer): - if type(initializer) == str: + if isinstance(initializer, str): initializer = self.intlist_from_str(initializer) super().__init__(self.__prefix + initializer)