diff --git a/sloth/annotations/model.py b/sloth/annotations/model.py index 6c0aff7..9ef56da 100644 --- a/sloth/annotations/model.py +++ b/sloth/annotations/model.py @@ -999,7 +999,7 @@ def interpolateRange(self): for l in range(len(lann)): if lann[l]['type'] == fann[i]['type'] and lann[l]['class'] == fann[i]['class']: lannIdx = l - if lannIdx == None: + if lannIdx is None: LOG.error("Error: could not find matching label, skipping") continue diff --git a/sloth/gui/labeltool.py b/sloth/gui/labeltool.py index 29f2fc1..1341d46 100644 --- a/sloth/gui/labeltool.py +++ b/sloth/gui/labeltool.py @@ -129,7 +129,7 @@ def onCurrentImageChanged(self): img = self.labeltool.getImage(new_image) - if img == None: + if img is None: self.controls.setFilename("") self.selectionmodel.setCurrentIndex(new_image.index(), QItemSelectionModel.ClearAndSelect|QItemSelectionModel.Rows) return