laforge has uploaded this change for review.

View Change

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
---
M pySim/esim/saip/oid.py
1 file changed, 14 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/35836/1
diff --git a/pySim/esim/saip/oid.py b/pySim/esim/saip/oid.py
index e1892be..238e49f 100644
--- a/pySim/esim/saip/oid.py
+++ b/pySim/esim/saip/oid.py
@@ -27,7 +27,7 @@
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 @@
"""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)


To view, visit change 35836. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I65c9cd1bb2b6a1747a7fbb25052adc75605bc870
Gerrit-Change-Number: 35836
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>
Gerrit-MessageType: newchange