Bläddra i källkod

Fix for flake8

Kentaro Wada 7 år sedan
förälder
incheckning
b276e1c634
3 ändrade filer med 6 tillägg och 6 borttagningar
  1. 4 4
      labelme/app.py
  2. 1 1
      labelme/canvas.py
  3. 1 1
      labelme/labelDialog.py

+ 4 - 4
labelme/app.py

@@ -13,7 +13,7 @@ from qtpy.QtCore import Qt
 from qtpy import QtGui
 from qtpy import QtWidgets
 
-QT5 = QT_VERSION[0] == '5'
+QT5 = QT_VERSION[0] == '5'  # NOQA
 
 from labelme import __appname__
 from labelme import __version__
@@ -590,12 +590,12 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
             return True
 
         for i in range(self.uniqLabelList.count()):
-            l = self.uniqLabelList.item(i).text()
+            label_i = self.uniqLabelList.item(i).text()
             if self._config['validate_label'] in ['exact', 'instance']:
-                if l == label:
+                if label_i == label:
                     return True
             if self._config['validate_label'] == 'instance':
-                m = re.match(r'^{}-[0-9]*$'.format(l), label)
+                m = re.match(r'^{}-[0-9]*$'.format(label_i), label)
                 if m:
                     return True
         return False

+ 1 - 1
labelme/canvas.py

@@ -3,7 +3,7 @@ from qtpy import QtCore
 from qtpy import QtGui
 from qtpy import QtWidgets
 
-QT5 = QT_VERSION[0] == '5'
+QT5 = QT_VERSION[0] == '5'  # NOQA
 
 from labelme.lib import distance
 from labelme.shape import Shape

+ 1 - 1
labelme/labelDialog.py

@@ -3,7 +3,7 @@ from qtpy import QtCore
 from qtpy import QtGui
 from qtpy import QtWidgets
 
-QT5 = QT_VERSION[0] == '5'
+QT5 = QT_VERSION[0] == '5'  # NOQA
 
 from labelme.lib import labelValidator
 from labelme.lib import newIcon