clean-up: fix most PEP8 E221 multiple spaces before operator
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Wed, 16 Aug 2017 13:56:36 +0300
changeset 1754 63f4af6bf6d9
parent 1753 19f19c66b67e
child 1755 624b9694cb0d
clean-up: fix most PEP8 E221 multiple spaces before operator
ProjectController.py
controls/FolderTree.py
controls/LibraryPanel.py
controls/PouInstanceVariablesPanel.py
controls/VariablePanel.py
dialogs/ArrayTypeDialog.py
dialogs/DiscoveryDialog.py
editors/ConfTreeNodeEditor.py
editors/DataTypeEditor.py
graphics/GraphicCommons.py
graphics/SFC_Objects.py
i18n/mki18n.py
svgui/pyjs/build.py
svgui/pyjs/jsonrpc/django/jsonrpc.py
svgui/pyjs/pyjs.py
version.py
--- a/ProjectController.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/ProjectController.py	Wed Aug 16 13:56:36 2017 +0300
@@ -97,7 +97,7 @@
     def __init__(self):
         self.iec2c = None
         self.iec2c_buildopts = None
-        self.ieclib_path   = self.findLibPath()
+        self.ieclib_path = self.findLibPath()
         self.ieclib_c_path = self.findLibCPath()
 
     def findObject(self, paths, test):
@@ -1472,7 +1472,7 @@
         # If no entry exist, create a new one with a fresh WeakKeyDictionary
         IECdebug_data = self.IECdebug_datas.get(IECPath, None)
         if IECdebug_data is None:
-            IECdebug_data  = [
+            IECdebug_data = [
                     WeakKeyDictionary(),  # Callables
                     [],                   # Data storage [(tick, data),...]
                     "Registered",         # Variable status
--- a/controls/FolderTree.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/controls/FolderTree.py	Wed Aug 16 13:56:36 2017 +0300
@@ -57,10 +57,10 @@
         main_sizer = wx.BoxSizer(wx.VERTICAL)
 
         self.Tree = wx.TreeCtrl(self,
-              style=wx.TR_HAS_BUTTONS   |
-                    wx.TR_SINGLE        |
-                    wx.SUNKEN_BORDER    |
-                    wx.TR_HIDE_ROOT     |
+              style=wx.TR_HAS_BUTTONS |
+                    wx.TR_SINGLE |
+                    wx.SUNKEN_BORDER |
+                    wx.TR_HIDE_ROOT |
                     wx.TR_LINES_AT_ROOT |
                     wx.TR_EDIT_LABELS)
         if wx.Platform == '__WXMSW__':
--- a/controls/LibraryPanel.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/controls/LibraryPanel.py	Wed Aug 16 13:56:36 2017 +0300
@@ -85,9 +85,9 @@
         self.Tree = wx.TreeCtrl(splitter_window,
               size=wx.Size(0, 0),
               style=wx.TR_HAS_BUTTONS |
-                    wx.TR_SINGLE      |
-                    wx.SUNKEN_BORDER  |
-                    wx.TR_HIDE_ROOT   |
+                    wx.TR_SINGLE |
+                    wx.SUNKEN_BORDER |
+                    wx.TR_HIDE_ROOT |
                     wx.TR_LINES_AT_ROOT)
         self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnTreeItemSelected, self.Tree)
         self.Tree.Bind(wx.EVT_CHAR, self.OnKeyDown)
--- a/controls/PouInstanceVariablesPanel.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/controls/PouInstanceVariablesPanel.py	Wed Aug 16 13:56:36 2017 +0300
@@ -145,11 +145,11 @@
 
         self.VariablesList = CustomTreeCtrlWithRightImage(self,
               style=wx.SUNKEN_BORDER,
-              agwStyle=CT.TR_NO_BUTTONS              |
-                       CT.TR_SINGLE                  |
+              agwStyle=CT.TR_NO_BUTTONS |
+                       CT.TR_SINGLE |
                        CT.TR_HAS_VARIABLE_ROW_HEIGHT |
-                       CT.TR_HIDE_ROOT               |
-                       CT.TR_NO_LINES                |
+                       CT.TR_HIDE_ROOT |
+                       CT.TR_NO_LINES |
                        getattr(CT, "TR_ALIGN_WINDOWS_RIGHT", CT.TR_ALIGN_WINDOWS))
         self.VariablesList.SetIndent(0)
         self.VariablesList.SetSpacing(5)
--- a/controls/VariablePanel.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/controls/VariablePanel.py	Wed Aug 16 13:56:36 2017 +0300
@@ -516,8 +516,8 @@
             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.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]
 
         else:
@@ -538,8 +538,8 @@
             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.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]
 
         self.PanelWidthMin = sum(self.ColSizes)
--- a/dialogs/ArrayTypeDialog.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/dialogs/ArrayTypeDialog.py	Wed Aug 16 13:56:36 2017 +0300
@@ -59,7 +59,7 @@
         top_sizer.AddWindow(self.BaseType, 1, flag=wx.GROW)
 
         self.Dimensions = CustomEditableListBox(self, label=_("Dimensions:"),
-              style=wx.gizmos.EL_ALLOW_NEW  |
+              style=wx.gizmos.EL_ALLOW_NEW |
                     wx.gizmos.EL_ALLOW_EDIT |
                     wx.gizmos.EL_ALLOW_DELETE)
         for func in ["_OnLabelEndEdit",
--- a/dialogs/DiscoveryDialog.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/dialogs/DiscoveryDialog.py	Wed Aug 16 13:56:36 2017 +0300
@@ -225,10 +225,10 @@
         '''
         info = self.ZeroConfInstance.getServiceInfo(_type, name)
 
-        svcname  = name.split(".")[0]
+        svcname =   name.split(".")[0]
         typename = _type.split(".")[0][1:]
-        ip       = str(socket.inet_ntoa(info.getAddress()))
-        port     = info.getPort()
+        ip =        str(socket.inet_ntoa(info.getAddress()))
+        port =      info.getPort()
 
         num_items = self.ServicesList.GetItemCount()
 
--- a/editors/ConfTreeNodeEditor.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/editors/ConfTreeNodeEditor.py	Wed Aug 16 13:56:36 2017 +0300
@@ -298,7 +298,7 @@
         self.Thaw()
 
     def GenerateMethodButtonSizer(self):
-        normal_bt_font    = wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
+        normal_bt_font =    wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
         mouseover_bt_font = wx.Font(faces["size"] / 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"], underline=True)
 
         msizer = wx.BoxSizer(wx.HORIZONTAL)
--- a/editors/DataTypeEditor.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/editors/DataTypeEditor.py	Wed Aug 16 13:56:36 2017 +0300
@@ -263,7 +263,7 @@
         enumerated_panel_sizer = wx.BoxSizer(wx.HORIZONTAL)
 
         self.EnumeratedValues = CustomEditableListBox(self.EnumeratedPanel,
-              label=_("Values:"), style=wx.gizmos.EL_ALLOW_NEW  |
+              label=_("Values:"), style=wx.gizmos.EL_ALLOW_NEW |
                                         wx.gizmos.EL_ALLOW_EDIT |
                                         wx.gizmos.EL_ALLOW_DELETE)
         setattr(self.EnumeratedValues, "_OnLabelEndEdit", self.OnEnumeratedValueEndEdit)
@@ -325,7 +325,7 @@
               flag=wx.ALL)
 
         self.ArrayDimensions = CustomEditableListBox(self.ArrayPanel,
-              label=_("Dimensions:"), style=wx.gizmos.EL_ALLOW_NEW  |
+              label=_("Dimensions:"), style=wx.gizmos.EL_ALLOW_NEW |
                                             wx.gizmos.EL_ALLOW_EDIT |
                                             wx.gizmos.EL_ALLOW_DELETE)
         for func in ["_OnLabelEndEdit", "_OnAddButton", "_OnDelButton",
--- a/graphics/GraphicCommons.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/graphics/GraphicCommons.py	Wed Aug 16 13:56:36 2017 +0300
@@ -1384,7 +1384,7 @@
             connector_max_used = False
 
         # connector is available for new connection
-        connect  = connector_free or not connector_max_used
+        connect = connector_free or not connector_max_used
         return connect, connector_max_used
 
     # Tests if the point given is near from the end point of this connector
--- a/graphics/SFC_Objects.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/graphics/SFC_Objects.py	Wed Aug 16 13:56:36 2017 +0300
@@ -587,7 +587,7 @@
         self.Priority = 0
         self.Size = wx.Size(SFC_TRANSITION_SIZE[0], SFC_TRANSITION_SIZE[1])
         # Create an input and output connector
-        self.Input  = Connector(self, "", None, wx.Point(self.Size[0] / 2, 0),            NORTH, onlyone=True)
+        self.Input =  Connector(self, "", None, wx.Point(self.Size[0] / 2, 0),            NORTH, onlyone=True)
         self.Output = Connector(self, "", None, wx.Point(self.Size[0] / 2, self.Size[1]), SOUTH, onlyone=True)
         self.SetType(type, condition)
         self.SetPriority(priority)
--- a/i18n/mki18n.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/i18n/mki18n.py	Wed Aug 16 13:56:36 2017 +0300
@@ -88,7 +88,7 @@
 # ----------------
 #
 
-__author__  = "Pierre Rouleau"
+__author__ =  "Pierre Rouleau"
 __version__ = "$Revision: 1.5 $"
 
 # -----------------------------------------------------------------------------
@@ -436,7 +436,7 @@
         printUsage('Missing argument: specify at least one of -m or -p (or both).')
         sys.exit(1)
     # If there is some arguments, parse the command line
-    validOptions     = "ehmpv"
+    validOptions = "ehmpv"
     validLongOptions = ['domain=', 'moTarget=']
     option = {}
     option['forceEnglish'] = 0
--- a/svgui/pyjs/build.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/svgui/pyjs/build.py	Wed Aug 16 13:56:36 2017 +0300
@@ -138,8 +138,8 @@
 </html>
 """
 
-    filename  = os.path.split   (source_file)[1]
-    mod_name  = os.path.splitext(filename)[0]
+    filename =  os.path.split   (source_file)[1]
+    mod_name =  os.path.splitext(filename)[0]
     file_name = os.path.join    (dest_path, mod_name + '.html')
 
     # if html file in output directory exists, leave it alone.
--- a/svgui/pyjs/jsonrpc/django/jsonrpc.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/svgui/pyjs/jsonrpc/django/jsonrpc.py	Wed Aug 16 13:56:36 2017 +0300
@@ -144,7 +144,7 @@
         if _formcls is None:
             JSONRPCService.__init__(self)
             for k in forms.keys():
-                s  = FormProcessor({}, forms[k])
+                s = FormProcessor({}, forms[k])
                 self.add_method(k, s.__process)
         else:
             JSONRPCService.__init__(self, forms)
--- a/svgui/pyjs/pyjs.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/svgui/pyjs/pyjs.py	Wed Aug 16 13:56:36 2017 +0300
@@ -330,7 +330,7 @@
         #print >> self.output, "};\n"
 
         print >> self.output, "return this;\n"
-        print >> self.output, "}; /* end %s */ \n"  % module_name
+        print >> self.output, "}; /* end %s */ \n" % module_name
 
     def module_imports(self):
         return self.imported_modules + self.imported_modules_as
--- a/version.py	Wed Aug 16 13:49:02 2017 +0300
+++ b/version.py	Wed Aug 16 13:56:36 2017 +0300
@@ -73,7 +73,7 @@
     info.Name = "Beremiz"
     info.Version = app_version
 
-    info.Copyright  = "(C) 2016 Andrey Skvortsov\n"
+    info.Copyright =  "(C) 2016 Andrey Skvortsov\n"
     info.Copyright += "(C) 2008-2015 Eduard Tisserant\n"
     info.Copyright += "(C) 2008-2015 Laurent Bessard"