clean etherlab: pylint, C0412 # (ungrouped-imports) Imports from package X are not grouped
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 29 Sep 2018 16:29:41 +0300
changeset 2392 aad985da14f7
parent 2391 3315e621d7fb
child 2393 fddc29dee614
clean etherlab: pylint, C0412 # (ungrouped-imports) Imports from package X are not grouped
etherlab/ConfigEditor.py
etherlab/EthercatMaster.py
--- a/etherlab/ConfigEditor.py	Sat Sep 29 16:23:20 2018 +0300
+++ b/etherlab/ConfigEditor.py	Sat Sep 29 16:29:41 2018 +0300
@@ -20,13 +20,13 @@
 
 from plcopen.structures import IEC_KEYWORDS, TestIdentifier
 from controls import CustomGrid, CustomTable, FolderTree
+from controls.CustomStyledTextCtrl import NAVIGATION_KEYS
 from editors.ConfTreeNodeEditor import ConfTreeNodeEditor, SCROLLBAR_UNIT
 from util.BitmapLibrary import GetBitmap
-from controls.CustomStyledTextCtrl import NAVIGATION_KEYS
+from util.TranslationCatalogs import NoTranslate
 
 # -----------------------------------------------------------------------
 from EtherCATManagementEditor import EtherCATManagementTreebook, MasterStatePanelClass
-from util.TranslationCatalogs import NoTranslate
 # -----------------------------------------------------------------------
 
 [ETHERCAT_VENDOR, ETHERCAT_GROUP, ETHERCAT_DEVICE] = range(3)
@@ -240,7 +240,7 @@
                     else:
                         dir = "%Q"
                     location = "%s%s" % (dir, data_size) + \
-                               ".".join(map(lambda x: str(x), location + (entry_index, entry_subindex)))
+                               ".".join(map(str, location + (entry_index, entry_subindex)))
 
                     data = wx.TextDataObject(str((location, "location", data_type, var_name, "", access)))
                     dragSource = wx.DropSource(self.VariablesGrid)
@@ -1005,7 +1005,7 @@
             data_size = self.Controler.GetSizeOfType(var_type)
             number = self.ProcessVariablesTable.GetValueByName(row, "Number")
             location = "%%M%s" % data_size + \
-                       ".".join(map(lambda x: str(x), self.Controler.GetCurrentLocation() + (number,)))
+                       ".".join(map(str, self.Controler.GetCurrentLocation() + (number,)))
 
             data = wx.TextDataObject(str((location, "location", var_type, var_name, "")))
             dragSource = wx.DropSource(self.ProcessVariablesGrid)
--- a/etherlab/EthercatMaster.py	Sat Sep 29 16:23:20 2018 +0300
+++ b/etherlab/EthercatMaster.py	Sat Sep 29 16:29:41 2018 +0300
@@ -22,11 +22,11 @@
 from ConfigTreeNode import ConfigTreeNode
 from dialogs import BrowseValuesLibraryDialog
 from IDEFrame import TITLE, FILEMENU, PROJECTTREE
-
+from POULibrary import POULibrary
+
+from ConfigEditor import MasterEditor
+from EthercatCFileGenerator import _EthercatCFileGenerator
 from EthercatSlave import _EthercatSlaveCTN, ExtractHexDecValue, GenerateHexDecValue, TYPECONVERSION, VARCLASSCONVERSION, _CommonSlave
-from EthercatCFileGenerator import _EthercatCFileGenerator
-from ConfigEditor import MasterEditor
-from POULibrary import POULibrary
 
 try:
     from EthercatCIA402Slave import _EthercatCIA402SlaveCTN