clean-up: fix some PEP8 E265 block comment should start with '# '
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 14 Aug 2017 21:31:01 +0300
changeset 1733 dea107dce0c4
parent 1732 94ffe74e6895
child 1734 750eeb7230a1
clean-up: fix some PEP8 E265 block comment should start with '# '
ConfigTreeNode.py
IDEFrame.py
ProjectController.py
controls/SearchResultPanel.py
controls/TextCtrlAutoComplete.py
editors/ConfTreeNodeEditor.py
editors/LDViewer.py
targets/typemapping.py
--- a/ConfigTreeNode.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/ConfigTreeNode.py	Mon Aug 14 21:31:01 2017 +0300
@@ -277,7 +277,7 @@
             # LDFLAGS can be either string
             if type(CTNLDFLAGS)==type(str()):
                 LDFLAGS=[CTNLDFLAGS]
-            #or list of strings
+            # or list of strings
             elif type(CTNLDFLAGS)==type(list()):
                 LDFLAGS=CTNLDFLAGS[:]
         else:
@@ -290,7 +290,7 @@
             depth=len(new_location)
             _LocationCFilesAndCFLAGS, _LDFLAGS, _extra_files = \
                 CTNChild._Generate_C(
-                    #keep the same path
+                    # keep the same path
                     buildpath,
                     # filter locations that start with current IEC location
                     [loc for loc in locations if loc["LOC"][0:depth] == new_location ])
@@ -561,7 +561,7 @@
                 NewCTNName = _self.FindNewName(CTNName)
                 # If dir have already be made, and file exist
                 if os.path.isdir(_self.CTNPath(NewCTNName)): #and os.path.isfile(_self.ConfNodeXmlFilePath(CTNName)):
-                    #Load the confnode.xml file into parameters members
+                    # Load the confnode.xml file into parameters members
                     _self.LoadXMLParams(NewCTNName)
                     # Basic check. Better to fail immediately.
                     if (_self.BaseParams.getName() != NewCTNName):
@@ -576,9 +576,9 @@
                     # Call the confnode real __init__
                     if getattr(CTNClass, "__init__", None):
                         CTNClass.__init__(_self)
-                    #Load and init all the children
+                    # Load and init all the children
                     _self.LoadChildren()
-                    #just loaded, nothing to saved
+                    # just loaded, nothing to saved
                     _self.ChangesToSave = False
                 else:
                     # If confnode do not have corresponding file/dirs - they will be created on Save
@@ -589,7 +589,7 @@
                     if getattr(CTNClass, "__init__", None):
                         CTNClass.__init__(_self)
                     _self.CTNRequestSave()
-                    #just created, must be saved
+                    # just created, must be saved
                     _self.ChangesToSave = True
 
             def _getBuildPath(_self):
--- a/IDEFrame.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/IDEFrame.py	Mon Aug 14 21:31:01 2017 +0300
@@ -666,7 +666,7 @@
 
         # Icons for other items
         for imgname, itemtype in [
-            #editables
+            # editables
             ("PROJECT",        ITEM_PROJECT),
             #("POU",            ITEM_POU),
             #("VARIABLE",       ITEM_VARIABLE),
--- a/ProjectController.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/ProjectController.py	Mon Aug 14 21:31:01 2017 +0300
@@ -468,11 +468,11 @@
         self._setBuildPath(BuildPath)
         # If dir have already be made, and file exist
         if os.path.isdir(self.CTNPath()) and os.path.isfile(self.ConfNodeXmlFilePath()):
-            #Load the confnode.xml file into parameters members
+            # Load the confnode.xml file into parameters members
             result = self.LoadXMLParams()
             if result:
                 return result, False
-            #Load and init all the children
+            # Load and init all the children
             self.LoadChildren()
         self.RefreshConfNodesBlockLists()
         self.UpdateButtons()
--- a/controls/SearchResultPanel.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/controls/SearchResultPanel.py	Mon Aug 14 21:31:01 2017 +0300
@@ -118,7 +118,7 @@
 
         # Icons for other items
         for imgname, itemtype in [
-            #editables
+            # editables
             ("PROJECT",        ITEM_PROJECT),
             ("TRANSITION",     ITEM_TRANSITION),
             ("ACTION",         ITEM_ACTION),
--- a/controls/TextCtrlAutoComplete.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py	Mon Aug 14 21:31:01 2017 +0300
@@ -119,7 +119,7 @@
 
         wx.TextCtrl.__init__(self, parent, **therest)
         
-        #Some variables
+        # Some variables
         self._dropDownClick = dropDownClick
         self._lastinsertionpoint = None
         self._hasfocus = False
@@ -142,7 +142,7 @@
         self.Bind(wx.EVT_TEXT, self.OnEnteredText)
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
 
-        #If need drop down on left click
+        # If need drop down on left click
         if dropDownClick:
             self.Bind(wx.EVT_LEFT_DOWN, self.OnClickToggleDown)
             self.Bind(wx.EVT_LEFT_UP, self.OnClickToggleUp)
--- a/editors/ConfTreeNodeEditor.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/editors/ConfTreeNodeEditor.py	Mon Aug 14 21:31:01 2017 +0300
@@ -319,7 +319,7 @@
                     return fn
                 button.Bind(wx.EVT_ENTER_WINDOW, setFontStyle(button, mouseover_bt_font))
                 button.Bind(wx.EVT_LEAVE_WINDOW, setFontStyle(button, normal_bt_font))
-                #hack to force size to mini
+                # hack to force size to mini
                 if not confnode_method.get("enabled",True):
                     button.Disable()
                 msizer.AddWindow(button, flag=wx.ALIGN_CENTER)
--- a/editors/LDViewer.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/editors/LDViewer.py	Mon Aug 14 21:31:01 2017 +0300
@@ -89,7 +89,6 @@
                 branch_size += values["weight"]
             else:
                 return 1
-    #print branch_size
     return branch_size
 
 def RemoveElement(remove, element_tree):
--- a/targets/typemapping.py	Mon Aug 14 21:20:32 2017 +0300
+++ b/targets/typemapping.py	Mon Aug 14 21:31:01 2017 +0300
@@ -78,7 +78,7 @@
     }
 
 SwapedEndianessTypeTranslator = {
-    #TODO
+    # TODO
     }
 
 TypeTranslator=SameEndianessTypeTranslator