Skip to content

Commit 40a8432

Browse files
committed
python 3.9 warnings cleared
1 parent 22c24d3 commit 40a8432

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cbmpy/CBModel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5877,7 +5877,7 @@ def createAssociationAndGeneRefsFromTree(self, gprtree, altlabels=None):
58775877
# print('addGeneRef')
58785878
else:
58795879
# print('createAssociationAndGeneRefs', gid, label)
5880-
if gid is None or gid is 'None':
5880+
if gid is None or gid == 'None':
58815881
print(self.getTree(), genes, gid, label)
58825882
continue
58835883
self.__objref__().addGene(Gene(gid, label, active=True))

cbmpy/CBWrite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,7 @@ def convertExcelToFloat(num):
30273027
## keep this in sync with convertFloatToExcel
30283028
if num == '':
30293029
rval = None
3030-
elif num is 'nan':
3030+
elif num == 'nan':
30313031
rval = numpy.nan
30323032
elif num == 'inf':
30333033
rval = numpy.inf

cbmpy/CBXML.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def formatSbmlId(s):
277277
out += x
278278
else:
279279
out += '_'
280-
if not out[0].isalpha() and out[0] is not '_':
280+
if not out[0].isalpha() and out[0] != '_':
281281
out = '_' + out
282282
return out
283283

0 commit comments

Comments
 (0)