clean-up: fix PEP8 E211 whitespace before '[' or '('
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 19 Aug 2017 00:11:12 +0300
changeset 1771 f68a105000be
parent 1770 449fd504a711
child 1772 c3679f96020b
clean-up: fix PEP8 E211 whitespace before '[' or '('
controls/CustomToolTip.py
controls/TextCtrlAutoComplete.py
svgui/pyjs/build.py
svgui/pyjs/pyjs.py
--- a/controls/CustomToolTip.py	Sat Aug 19 00:04:33 2017 +0300
+++ b/controls/CustomToolTip.py	Sat Aug 19 00:11:12 2017 +0300
@@ -106,8 +106,8 @@
                 if len(self.Tip[-1]) < TOOLTIP_MAX_CHARACTERS - 3:
                     self.Tip[-1] += "..."
                 else:
-                    self.Tip[-1] = self.Tip[-1]\
-                        [:TOOLTIP_MAX_CHARACTERS - 3] + "..."
+                    self.Tip[-1] = self.Tip[-1][:TOOLTIP_MAX_CHARACTERS - 3] + \
+                                   "..."
         else:
             self.Tip = tip.splitlines()
 
--- a/controls/TextCtrlAutoComplete.py	Sat Aug 19 00:04:33 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py	Sat Aug 19 00:11:12 2017 +0300
@@ -110,8 +110,8 @@
 
 class TextCtrlAutoComplete(wx.TextCtrl):
 
-    def __init__ (self, parent, choices=None, dropDownClick=True,
-                  element_path=None, **therest):
+    def __init__(self, parent, choices=None, dropDownClick=True,
+                 element_path=None, **therest):
         """
         Constructor works just like wx.TextCtrl except you can pass in a
         list of choices.  You can also change the choice list at any time
--- a/svgui/pyjs/build.py	Sat Aug 19 00:04:33 2017 +0300
+++ b/svgui/pyjs/build.py	Sat Aug 19 00:11:12 2017 +0300
@@ -143,7 +143,7 @@
     file_name = os.path.join(dest_path, mod_name + '.html')
 
     # if html file in output directory exists, leave it alone.
-    if os.path.exists (file_name):
+    if os.path.exists(file_name):
         return 0
 
     if os.path.exists(os.path.join(dest_path, mod_name + '.css')):
@@ -158,9 +158,9 @@
 
     base_html = base_html % {'modulename': mod_name, 'title': title, 'css': css}
 
-    fh = open (file_name, 'w')
-    fh.write  (base_html)
-    fh.close  ()
+    fh = open(file_name, 'w')
+    fh.write(base_html)
+    fh.close()
 
     return 1
 
--- a/svgui/pyjs/pyjs.py	Sat Aug 19 00:04:33 2017 +0300
+++ b/svgui/pyjs/pyjs.py	Sat Aug 19 00:11:12 2017 +0300
@@ -588,9 +588,9 @@
             k = []
             if isinstance(expr, ast.Tuple):
                 for x in expr.nodes:
-                    k.append("(%(err)s.__name__ == %(expr)s.__name__)" % dict (err=errName, expr=self.expr(x, current_klass)))
-            else:
-                k = [" (%(err)s.__name__ == %(expr)s.__name__) " % dict (err=errName, expr=self.expr(expr, current_klass))]
+                    k.append("(%(err)s.__name__ == %(expr)s.__name__)" % dict(err=errName, expr=self.expr(x, current_klass)))
+            else:
+                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)