clean-up: fix PEP8 E741 ambiguous variable name
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 16 Aug 2017 15:18:57 +0300
changeset 1755 624b9694cb0d
parent 1754 63f4af6bf6d9
child 1756 08e4394ff4fb
clean-up: fix PEP8 E741 ambiguous variable name
controls/VariablePanel.py
dialogs/DiscoveryDialog.py
svgui/pyjs/build.py
svgui/pyjs/pyjs.py
--- a/controls/VariablePanel.py	Wed Aug 16 13:56:36 2017 +0300
+++ b/controls/VariablePanel.py	Wed Aug 16 15:18:57 2017 +0300
@@ -512,13 +512,13 @@
                                         "Variables", "   Local", "   Temp"]  #,"Access"]
 
             # these condense the ColAlignements list
-            l = wx.ALIGN_LEFT
-            c = wx.ALIGN_CENTER
-
-            #                        Num   Name    Class   Type    Loc     Init    Option   Doc
-            self.ColSizes =         [40,   80,     100,    80,     110,    120,    100,     160]
-            self.ColAlignements =   [c,    l,      l,      l,      l,      l,      l,       l]
-            self.ColFixedSizeFlag = [True, False,  True,   False,  True,   True,   True,    False]
+            left =   wx.ALIGN_LEFT
+            center = wx.ALIGN_CENTER
+
+            #                        Num     Name    Class   Type    Loc     Init    Option   Doc
+            self.ColSizes =         [40,     80,     100,    80,     110,    120,    100,     160]
+            self.ColAlignements =   [center, left,   left,   left,   left,   left,   left,    left]
+            self.ColFixedSizeFlag = [True,   False,  True,   False,  True,   True,   True,    False]
 
         else:
             # this is an element that cannot have located variables
@@ -534,13 +534,13 @@
                                         "Variables", "   Local", "   Temp"]
 
             # these condense the ColAlignements list
-            l = wx.ALIGN_LEFT
-            c = wx.ALIGN_CENTER
-
-            #                        Num   Name    Class   Type    Init    Option   Doc
-            self.ColSizes =         [40,   80,     100,    80,     120,    100,     160]
-            self.ColAlignements =   [c,    l,      l,      l,      l,      l,       l]
-            self.ColFixedSizeFlag = [True, False,  True,   False,  True,   True,    False]
+            left =   wx.ALIGN_LEFT
+            center = wx.ALIGN_CENTER
+
+            #                        Num     Name    Class   Type    Init    Option   Doc
+            self.ColSizes =         [40,     80,     100,    80,     120,    100,     160]
+            self.ColAlignements =   [center, left,   left,   left,   left,   left,    left]
+            self.ColFixedSizeFlag = [True,   False,  True,   False,  True,   True,    False]
 
         self.PanelWidthMin = sum(self.ColSizes)
 
--- a/dialogs/DiscoveryDialog.py	Wed Aug 16 13:56:36 2017 +0300
+++ b/dialogs/DiscoveryDialog.py	Wed Aug 16 15:18:57 2017 +0300
@@ -158,8 +158,8 @@
 
     def OnIpButton(self, event):
         if self.LatestSelection is not None:
-            l = lambda col: self.getColumnText(self.LatestSelection, col)
-            self.URI = "%s://%s:%s" % tuple(map(l, (1, 2, 3)))
+            addr = lambda col: self.getColumnText(self.LatestSelection, col)
+            self.URI = "%s://%s:%s" % tuple(map(addr, (1, 2, 3)))
             self.EndModal(wx.ID_OK)
         event.Skip()
 
--- a/svgui/pyjs/build.py	Wed Aug 16 13:56:36 2017 +0300
+++ b/svgui/pyjs/build.py	Wed Aug 16 15:18:57 2017 +0300
@@ -555,9 +555,9 @@
     for i in range(0, len(sd)-1):
         parent = sd[i]
         child = sd[i+1]
-        l = deps.get(child, [])
-        l.append(parent)
-        deps[child] = l
+        k = deps.get(child, [])
+        k.append(parent)
+        deps[child] = k
         if parent not in res:
             res.append(parent)
     #print deps
--- a/svgui/pyjs/pyjs.py	Wed Aug 16 13:56:36 2017 +0300
+++ b/svgui/pyjs/pyjs.py	Wed Aug 16 15:18:57 2017 +0300
@@ -584,13 +584,13 @@
             self._stmt(stmt, current_klass)
         print >> self.output, "    } catch(%s) {" % errName
         if expr:
-            l = []
+            k = []
             if isinstance(expr, ast.Tuple):
                 for x in expr.nodes:
-                    l.append("(%(err)s.__name__ == %(expr)s.__name__)" % dict (err=errName, expr=self.expr(x, current_klass)))
+                    k.append("(%(err)s.__name__ == %(expr)s.__name__)" % dict (err=errName, expr=self.expr(x, current_klass)))
             else:
-                l = [" (%(err)s.__name__ == %(expr)s.__name__) " % dict (err=errName, expr=self.expr(expr, current_klass))]
-            print >> self.output, "   if(%s) {" % '||\n\t\t'.join(l)
+                k = [" (%(err)s.__name__ == %(expr)s.__name__) " % dict (err=errName, expr=self.expr(expr, current_klass))]
+            print >> self.output, "   if(%s) {" % '||\n\t\t'.join(k)
         for stmt in node.handlers[0][2]:
             self._stmt(stmt, current_klass)
         if expr: