[cleanup] replace equality by "is"

This commit is contained in:
marcel committed 2018-07-17 14:45:50 +02:00
1 parent e210bd8793
commit b22d04db47
9 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -148,7 +148,7 @@ class Metadata(object):
try:
invtype, robj = self._read_metadata_file(inv_fname)
if robj == None:
if robj is None:
return
except Exception as e:
print('Could not read file {}'.format(inv_fname))
@@ -545,7 +545,7 @@ def restitute_trace(input_tuple):
else:
finv = invlist[0]
inventory = read_inventory(finv, format='STATIONXML')
elif invtype == None:
elif invtype is None:
return no_metadata(tr, seed_id)
else:
remove_trace = True
+1 -1
View File
@@ -1110,7 +1110,7 @@ def loopIdentifyPhase(phase):
"""
from pylot.core.util.defaults import ALTSUFFIX
if phase == None:
if phase is None:
raise NameError('Can not identify phase that is None')
phase_copy = phase
+3 -3
View File
@@ -2421,7 +2421,7 @@ class PickDlg(QDialog):
if not x:
return
allpicks, pick_rel, phase, picktype = self.identify_selected_picks(x)
if pick_rel == None:
if pick_rel is None:
return
pick = allpicks[picktype][phase]
message = '{} {}-pick'.format(picktype, phase)
@@ -2442,7 +2442,7 @@ class PickDlg(QDialog):
return
x = event.mouseevent.xdata
allpicks, pick_rel, phase, picktype = self.identify_selected_picks(x)
if pick_rel == None:
if pick_rel is None:
return
pick = allpicks[picktype][phase]
message = '{} {}-pick'.format(picktype, phase)
@@ -2499,7 +2499,7 @@ class PickDlg(QDialog):
if not self.picks and not self.autopicks:
return
allpicks, pick_rel, phase, picktype = self.identify_selected_picks(x)
if pick_rel == None:
if pick_rel is None:
return
# delete the value from corresponding dictionary
allpicks[picktype].pop(phase)