[cleanup] replace equality by "is"
This commit is contained in:
1 parent
e210bd8793
commit
b22d04db47
9 files changed
+17
-17
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user