summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice
diff options
context:
space:
mode:
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r--src/kicadtoNgspice/Convert.py2
-rw-r--r--src/kicadtoNgspice/DeviceModel.py2
-rw-r--r--src/kicadtoNgspice/KicadtoNgspice.py3
-rw-r--r--src/kicadtoNgspice/Model.py2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 76b6ba57..8280f9e7 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -443,7 +443,7 @@ class Convert:
default = 0
# Cheking if value is iterable.its for vector
if (
- type(value) is not str and
+ not isinstance(value, str) and
hasattr(value, '__iter__')
):
addmodelLine += param + "=["
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index 72d433de..6a9ad9d9 100644
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -339,7 +339,7 @@ class DeviceModel(QtGui.QWidget):
json_data["deviceModel"][key][0]):
path_name = (
json_data["deviceModel"][key][0]
- )
+ )
else:
self.entry_var[i].setText("")
i = i + 1
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py
index 19f3ffe2..ef9201cb 100644
--- a/src/kicadtoNgspice/KicadtoNgspice.py
+++ b/src/kicadtoNgspice/KicadtoNgspice.py
@@ -484,8 +484,7 @@ class MainWindow(QtGui.QWidget):
for key, value in line[7].items():
if(
hasattr(value, '__iter__') and
- i <= end and type(value) is not
- str
+ i <= end and not isinstance(value, str)
):
for item in value:
fields = {
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py
index 6647feb7..a182dd4e 100644
--- a/src/kicadtoNgspice/Model.py
+++ b/src/kicadtoNgspice/Model.py
@@ -62,7 +62,7 @@ class Model(QtGui.QWidget):
# print "Key : ",key
# print "Value : ",value
# Check if value is iterable
- if type(value) is not str and hasattr(value, '__iter__'):
+ if not isinstance(value, str) and hasattr(value, '__iter__'):
# For tag having vector value
temp_tag = []
for item in value: