fix ungrouped imports from package X
--- a/BeremizIDE.py Thu Sep 28 16:25:05 2017 +0300
+++ b/BeremizIDE.py Thu Sep 28 17:20:31 2017 +0300
@@ -30,9 +30,9 @@
from time import time as gettime
from threading import Lock, Timer, currentThread
@@ -43,15 +43,16 @@
-import util.paths as paths
from docutil import OpenHtmlFrame
from editors.EditorPanel import EditorPanel
from editors.Viewer import Viewer
from editors.TextViewer import TextViewer
from editors.ResourceEditor import ConfigurationEditor, ResourceEditor
from editors.DataTypeEditor import DataTypeEditor
+from util import paths as paths from util.MiniTextControler import MiniTextControler
from util.ProcessLogger import ProcessLogger
+from util.BitmapLibrary import GetBitmap from controls.LogViewer import LogViewer
from controls.CustomStyledTextCtrl import CustomStyledTextCtrl
from controls import EnhancedStatusBar as esb
@@ -85,8 +86,6 @@
-from util.BitmapLibrary import GetBitmap
beremiz_dir = paths.AbsDir(__file__)
--- a/Beremiz_service.py Thu Sep 28 16:25:05 2017 +0300
+++ b/Beremiz_service.py Thu Sep 28 17:20:31 2017 +0300
@@ -29,7 +29,7 @@
-from threading import Thread, currentThread
+from threading import Thread, currentThread, Semaphore @@ -496,7 +496,6 @@
reactor.registerWxApp(app)
- from threading import Semaphore
wx_eval_lock = Semaphore(0)
main_thread = currentThread()
@@ -568,7 +567,7 @@
- import runtime.NevowServer as NS
+ import runtime.NevowServer as NS # pylint: disable=C0412 print(_("Nevow/Athena import failed :"), e)
@@ -576,7 +575,7 @@
- import runtime.WampClient as WC
+ import runtime.WampClient as WC # pylint: disable=C0412 print(_("WAMP import failed :"), e)
--- a/PLCOpenEditor.py Thu Sep 28 16:25:05 2017 +0300
+++ b/PLCOpenEditor.py Thu Sep 28 17:20:31 2017 +0300
@@ -34,6 +34,7 @@
import util.paths as paths
import util.ExceptionHandler
+from util.misc import InstallLocalRessources from IDEFrame import IDEFrame, AppendMenu
@@ -50,7 +51,6 @@
from PLCControler import PLCControler
from dialogs import ProjectDialog
from dialogs.AboutDialog import ShowAboutDialog
-from util.misc import InstallLocalRessources
# -------------------------------------------------------------------------------
--- a/ProjectController.py Thu Sep 28 16:25:05 2017 +0300
+++ b/ProjectController.py Thu Sep 28 17:20:31 2017 +0300
@@ -30,13 +30,13 @@
+from time import localtime from types import ListType
from threading import Timer, Lock, Thread
-from time import localtime
from datetime import datetime
from weakref import WeakKeyDictionary
from itertools import izip
@@ -44,7 +44,6 @@
import util.paths as paths
from util.misc import CheckPathPerm, GetClassImporter
@@ -58,8 +57,9 @@
from dialogs import DiscoveryDialog
from PLCControler import PLCControler
from plcopen.structures import IEC_KEYWORDS
-from targets.typemapping import DebugTypesSize, LogLevelsCount, LogLevels
-from targets.typemapping import UnpackDebugBuffer
+from targets.typemapping import DebugTypesSize, \ + LogLevelsCount, LogLevels, UnpackDebugBuffer from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage
base_folder = paths.AbsParentDir(__file__)
--- a/canfestival/canfestival.py Thu Sep 28 16:25:05 2017 +0300
+++ b/canfestival/canfestival.py Thu Sep 28 17:20:31 2017 +0300
@@ -50,15 +50,14 @@
from nodelist import NodeList
from nodemanager import NodeManager
import canfestival_config as local_canfestival_config
from commondialogs import CreateNodeDialog
from subindextable import IECTypeConversion, SizeConversion
from SlaveEditor import SlaveEditor, MasterViewer
from NetworkEditor import NetworkEditor
--- a/canfestival/config_utils.py Thu Sep 28 16:25:05 2017 +0300
+++ b/canfestival/config_utils.py Thu Sep 28 17:20:31 2017 +0300
@@ -24,6 +24,9 @@
from __future__ import print_function
# Translation between IEC types and Can Open types
@@ -694,10 +697,6 @@
if __name__ == "__main__":
Usage of config_utils.py test :
@@ -784,8 +783,6 @@
print("Reset Successful!")
testfile = open("test_config/result_tmp.txt", "w")
--- a/controls/VariablePanel.py Thu Sep 28 16:25:05 2017 +0300
+++ b/controls/VariablePanel.py Thu Sep 28 17:20:31 2017 +0300
@@ -37,8 +37,8 @@
from CustomTable import CustomTable
from LocationCellEditor import LocationCellEditor
from util.BitmapLibrary import GetBitmap
+from util.TranslationCatalogs import NoTranslate from PLCControler import _VariableInfos
-from util.TranslationCatalogs import NoTranslate
# -------------------------------------------------------------------------------
--- a/dialogs/ActionBlockDialog.py Thu Sep 28 16:25:05 2017 +0300
+++ b/dialogs/ActionBlockDialog.py Thu Sep 28 17:20:31 2017 +0300
@@ -27,8 +27,8 @@
from controls import CustomGrid, CustomTable
+from PLCControler import _ActionInfos from util.BitmapLibrary import GetBitmap
-from PLCControler import _ActionInfos
from util.TranslationCatalogs import NoTranslate
# -------------------------------------------------------------------------------
--- a/editors/CodeFileEditor.py Thu Sep 28 16:25:05 2017 +0300
+++ b/editors/CodeFileEditor.py Thu Sep 28 17:20:31 2017 +0300
@@ -32,12 +32,13 @@
from plcopen.plcopen import TestTextElement
from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType
from controls import CustomGrid, CustomTable
+from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS +from controls.VariablePanel import VARIABLE_NAME_SUFFIX_MODEL from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
from util.BitmapLibrary import GetBitmap
-from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS
-from controls.VariablePanel import VARIABLE_NAME_SUFFIX_MODEL
+from util.TranslationCatalogs import NoTranslate from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD
-from util.TranslationCatalogs import NoTranslate
[STC_CODE_ERROR, STC_CODE_SEARCH_RESULT,
STC_CODE_SECTION] = range(15, 18)
--- a/editors/ResourceEditor.py Thu Sep 28 16:25:05 2017 +0300
+++ b/editors/ResourceEditor.py Thu Sep 28 17:20:31 2017 +0300
@@ -31,8 +31,8 @@
from dialogs.DurationEditorDialog import IEC_TIME_MODEL
from EditorPanel import EditorPanel
from util.BitmapLibrary import GetBitmap
+from util.TranslationCatalogs import NoTranslate from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS, DefaultType
-from util.TranslationCatalogs import NoTranslate
# -------------------------------------------------------------------------------
--- a/editors/Viewer.py Thu Sep 28 16:25:05 2017 +0300
+++ b/editors/Viewer.py Thu Sep 28 17:20:31 2017 +0300
@@ -33,9 +33,8 @@
from plcopen.structures import *
from PLCControler import ITEM_VAR_LOCAL, ITEM_POU, ITEM_PROGRAM, ITEM_FUNCTIONBLOCK
from graphics.DebugDataConsumer import DebugDataConsumer
from editors.DebugViewer import DebugViewer, REFRESH_PERIOD
from EditorPanel import EditorPanel
--- a/runtime/WampClient.py Thu Sep 28 16:25:05 2017 +0300
+++ b/runtime/WampClient.py Thu Sep 28 17:20:31 2017 +0300
@@ -28,9 +28,9 @@
from autobahn.twisted import wamp
from autobahn.twisted.websocket import WampWebSocketClientFactory, connectWS
-from twisted.internet.defer import inlineCallbacks
from autobahn.wamp import types
from autobahn.wamp.serializer import MsgPackSerializer
+from twisted.internet.defer import inlineCallbacks from twisted.internet.protocol import ReconnectingClientFactory
--- a/svgui/pyjs/build.py Thu Sep 28 16:25:05 2017 +0300
+++ b/svgui/pyjs/build.py Thu Sep 28 17:20:31 2017 +0300
@@ -2,13 +2,13 @@
from __future__ import print_function
+from os.path import join, dirname, basename, abspath, split, isfile, isdir -from os.path import join, dirname, basename, abspath, split, isfile, isdir
from optparse import OptionParser
from cStringIO import StringIO
--- a/tests/tools/check_source.sh Thu Sep 28 16:25:05 2017 +0300
+++ b/tests/tools/check_source.sh Thu Sep 28 17:20:31 2017 +0300
@@ -205,8 +205,9 @@
enable=$enable,E1601 # print statement used
enable=$enable,C0325 # (superfluous-parens) Unnecessary parens after keyword
enable=$enable,W0404 # reimported module
- enable=$enable,C0411 # (wrong-import-order), standard import "import x" comes before "import y"
- enable=$enable,W0108 # (unnecessary-lambda), Lambda may not be necessary
+ enable=$enable,C0411 # (wrong-import-order) standard import "import x" comes before "import y" + enable=$enable,W0108 # (unnecessary-lambda) Lambda may not be necessary + enable=$enable,C0412 # (ungrouped-imports) Imports from package X are not grouped # enable=$enable,W0403 # relative import
# enable=$enable,W0622 # (redefined-builtin) Redefining built-in