# HG changeset patch # User Andrey Skvortsov # Date 1502953703 -10800 # Node ID ed2e2afb9573141130a7fb52890f7b84f7087b87 # Parent 56e7f4a11046a822332615a77cae0230b62976a2 clean-up: fix PEP8 E262 inline comment should start with '# ' diff -r 56e7f4a11046 -r ed2e2afb9573 BeremizIDE.py --- a/BeremizIDE.py Thu Aug 17 10:04:24 2017 +0300 +++ b/BeremizIDE.py Thu Aug 17 10:08:23 2017 +0300 @@ -1145,15 +1145,15 @@ ignored_exceptions = [] # a problem with a line in a module is only reported once per session -def AddExceptHook(path, app_version='[No version]'): #, ignored_exceptions=[]): +def AddExceptHook(path, app_version='[No version]'): def save_bug_report(e_type, e_value, e_traceback, bug_report_path, date): info = { - 'app-title': wx.GetApp().GetAppName(), # app_title + 'app-title': wx.GetApp().GetAppName(), 'app-version': app_version, 'wx-version': wx.VERSION_STRING, 'wx-platform': wx.Platform, - 'python-version': platform.python_version(), # sys.version.split()[0], + 'python-version': platform.python_version(), 'platform': platform.platform(), 'e-type': e_type, 'e-value': e_value, diff -r 56e7f4a11046 -r ed2e2afb9573 ConfigTreeNode.py --- a/ConfigTreeNode.py Thu Aug 17 10:04:24 2017 +0300 +++ b/ConfigTreeNode.py Thu Aug 17 10:08:23 2017 +0300 @@ -561,7 +561,7 @@ # check name is unique 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)): + if os.path.isdir(_self.CTNPath(NewCTNName)): # and os.path.isfile(_self.ConfNodeXmlFilePath(CTNName)): # Load the confnode.xml file into parameters members _self.LoadXMLParams(NewCTNName) # Basic check. Better to fail immediately. diff -r 56e7f4a11046 -r ed2e2afb9573 PLCOpenEditor.py --- a/PLCOpenEditor.py Thu Aug 17 10:04:24 2017 +0300 +++ b/PLCOpenEditor.py Thu Aug 17 10:08:23 2017 +0300 @@ -463,7 +463,7 @@ ignored_exceptions = [] # a problem with a line in a module is only reported once per session -def AddExceptHook(path, app_version='[No version]'): #, ignored_exceptions=[]): +def AddExceptHook(path, app_version='[No version]'): def handle_exception(e_type, e_value, e_traceback): traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func @@ -476,11 +476,11 @@ if result: ignored_exceptions.append(ex) info = { - 'app-title': wx.GetApp().GetAppName(), # app_title + 'app-title': wx.GetApp().GetAppName(), 'app-version': app_version, 'wx-version': wx.VERSION_STRING, 'wx-platform': wx.Platform, - 'python-version': platform.python_version(), #sys.version.split()[0], + 'python-version': platform.python_version(), 'platform': platform.platform(), 'e-type': e_type, 'e-value': e_value, diff -r 56e7f4a11046 -r ed2e2afb9573 ProjectController.py --- a/ProjectController.py Thu Aug 17 10:04:24 2017 +0300 +++ b/ProjectController.py Thu Aug 17 10:08:23 2017 +0300 @@ -1588,7 +1588,7 @@ self.TracedIECPath, self.DebugValuesBuffers, debug_vars): - IECdebug_data = self.IECdebug_datas.get(IECPath, None) #FIXME get + IECdebug_data = self.IECdebug_datas.get(IECPath, None) # FIXME get if IECdebug_data is not None and value is not None: forced = IECdebug_data[2:4] == ["Forced", value] if not IECdebug_data[4] and len(values_buffer) > 0: diff -r 56e7f4a11046 -r ed2e2afb9573 controls/VariablePanel.py --- a/controls/VariablePanel.py Thu Aug 17 10:04:24 2017 +0300 +++ b/controls/VariablePanel.py Thu Aug 17 10:08:23 2017 +0300 @@ -75,7 +75,7 @@ return {_("All"): _("All"), _("Interface"): _("Interface"), _(" Input"): _("Input"), _(" Output"): _("Output"), _(" InOut"): _("InOut"), _(" External"): _("External"), _("Variables"): _("Variables"), _(" Local"): _("Local"), - _(" Temp"): _("Temp"), _("Global"): _("Global")} #, _("Access") : _("Access")} + _(" Temp"): _("Temp"), _("Global"): _("Global")} # , _("Access") : _("Access")} VARIABLE_CHOICES_DICT = dict([(_(_class), _class) for _class in GetFilterChoiceTransfer().iterkeys()]) @@ -505,11 +505,11 @@ self.Table = VariableTable(self, [], GetVariableTableColnames(True)) if element_type in ["config", "resource"]: - self.FilterChoices = ["All", "Global"] #,"Access"] + self.FilterChoices = ["All", "Global"] # ,"Access"] else: self.FilterChoices = ["All", "Interface", " Input", " Output", " InOut", " External", - "Variables", " Local", " Temp"] #,"Access"] + "Variables", " Local", " Temp"] # ,"Access"] # these condense the ColAlignements list left = wx.ALIGN_LEFT diff -r 56e7f4a11046 -r ed2e2afb9573 runtime/PLCObject.py --- a/runtime/PLCObject.py Thu Aug 17 10:04:24 2017 +0300 +++ b/runtime/PLCObject.py Thu Aug 17 10:08:23 2017 +0300 @@ -215,7 +215,7 @@ self._LogMessage.restype = ctypes.c_int self._LogMessage.argtypes = [ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32] - self._log_read_buffer = ctypes.create_string_buffer(1 << 14) #16K + self._log_read_buffer = ctypes.create_string_buffer(1 << 14) # 16K self._GetLogMessage = self.PLClibraryHandle.GetLogMessage self._GetLogMessage.restype = ctypes.c_uint32 self._GetLogMessage.argtypes = [ctypes.c_uint8, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)]