beremiz

614396cbffbf
Parents 6811021e3d94
Children 1b8b5324506c
fix pylint warning '(unused-import), Unused import connectors'
  • +0 -4
    BeremizIDE.py
  • +1 -2
    Beremiz_service.py
  • +1 -2
    ConfigTreeNode.py
  • +0 -1
    IDEFrame.py
  • +0 -1
    NativeLib.py
  • +2 -3
    PLCControler.py
  • +2 -2
    PLCOpenEditor.py
  • +1 -4
    ProjectController.py
  • +0 -1
    canfestival/NetworkEditor.py
  • +0 -4
    canfestival/canfestival.py
  • +1 -1
    controls/CustomIntCtrl.py
  • +0 -1
    controls/DebugVariablePanel/DebugVariableGraphicViewer.py
  • +0 -1
    controls/DebugVariablePanel/DebugVariablePanel.py
  • +0 -1
    controls/DebugVariablePanel/DebugVariableTextViewer.py
  • +0 -3
    controls/DebugVariablePanel/DebugVariableViewer.py
  • +0 -1
    controls/VariablePanel.py
  • +0 -2
    dialogs/AboutDialog.py
  • +0 -2
    dialogs/BrowseLocationsDialog.py
  • +0 -2
    dialogs/DiscoveryDialog.py
  • +1 -1
    dialogs/LDPowerRailDialog.py
  • +0 -1
    dialogs/SearchInProjectDialog.py
  • +0 -3
    doc/conf.py
  • +0 -1
    docutil/dochtml.py
  • +0 -1
    editors/ConfTreeNodeEditor.py
  • +0 -1
    editors/LDViewer.py
  • +0 -1
    editors/ProjectNodeEditor.py
  • +1 -1
    editors/ResourceEditor.py
  • +2 -2
    editors/TextViewer.py
  • +0 -1
    editors/Viewer.py
  • +0 -2
    graphics/GraphicCommons.py
  • +1 -1
    plcopen/definitions.py
  • +0 -1
    plcopen/plcopen.py
  • +0 -1
    py_ext/PythonFileCTNMixin.py
  • +1 -2
    runtime/NevowServer.py
  • +1 -3
    runtime/PLCObject.py
  • +0 -1
    runtime/WampClient.py
  • +1 -3
    svgui/pyjs/build.py
  • +0 -5
    svgui/pyjs/jsonrpc/django/jsonrpc.py
  • +0 -1
    svgui/pyjs/jsonrpc/jsonrpc.py
  • +1 -1
    svgui/pyjs/lib/pyjslib.py
  • +0 -1
    svgui/svgui.py
  • +1 -1
    svgui/svgui_server.py
  • +0 -1
    targets/toolchain_makefile.py
  • +1 -1
    tests/tools/check_source.sh
  • +16 -10
    tests/tools/conftest.py
  • +1 -1
    tests/tools/test_CustomIntCtrl.py
  • +1 -1
    tests/tools/test_application.py
  • +0 -1
    util/ProcessLogger.py
  • +0 -1
    util/TranslationCatalogs.py
  • +0 -2
    util/misc.py
  • +1 -2
    xmlclass/xmlclass.py
  • --- a/BeremizIDE.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/BeremizIDE.py Fri Oct 06 17:52:34 2017 +0300
    @@ -29,9 +29,7 @@
    import tempfile
    import shutil
    import random
    -import re
    import types
    -import commands
    import time
    from time import time as gettime
    from threading import Lock, Timer, currentThread
    @@ -43,7 +41,6 @@
    import version
    -from docutil import OpenHtmlFrame
    from editors.EditorPanel import EditorPanel
    from editors.Viewer import Viewer
    from editors.TextViewer import TextViewer
    @@ -79,7 +76,6 @@
    PROJECTTREE,\
    POUINSTANCEVARIABLESPANEL,\
    LIBRARYTREE,\
    - SCALING,\
    PAGETITLES,\
    IDEFrame, \
    AppendMenu,\
    --- a/Beremiz_service.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/Beremiz_service.py Fri Oct 06 17:52:34 2017 +0300
    @@ -28,14 +28,13 @@
    import os
    import sys
    import getopt
    -import gettext
    import threading
    from threading import Thread, currentThread, Semaphore
    import traceback
    import __builtin__
    import Pyro.core as pyro
    -from runtime import PLCObject, PLCprint, ServicePublisher
    +from runtime import PLCObject, ServicePublisher
    import util.paths as paths
    --- a/ConfigTreeNode.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/ConfigTreeNode.py Fri Oct 06 17:52:34 2017 +0300
    @@ -38,9 +38,8 @@
    from lxml import etree
    from xmlclass import GenerateParserFromXSDstring
    -from util.misc import GetClassImporter
    -from PLCControler import PLCControler, LOCATION_CONFNODE
    +from PLCControler import LOCATION_CONFNODE
    from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
    _BaseParamsParser = GenerateParserFromXSDstring("""<?xml version="1.0" encoding="ISO-8859-1" ?>
    --- a/IDEFrame.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/IDEFrame.py Fri Oct 06 17:52:34 2017 +0300
    @@ -22,7 +22,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import os
    import sys
    import cPickle
    from types import TupleType
    --- a/NativeLib.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/NativeLib.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,7 +23,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import os
    import util.paths as paths
    from POULibrary import POULibrary
    --- a/PLCControler.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/PLCControler.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,11 +23,10 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -from xml.dom import minidom
    -from types import StringType, UnicodeType, TupleType
    +
    +from types import TupleType
    from copy import deepcopy
    import os
    -import sys
    import re
    import datetime
    from time import localtime
    --- a/PLCOpenEditor.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/PLCOpenEditor.py Fri Oct 06 17:52:34 2017 +0300
    @@ -45,8 +45,8 @@
    PROJECTTREE, \
    POUINSTANCEVARIABLESPANEL, \
    LIBRARYTREE, \
    - PAGETITLES
    -from IDEFrame import EncodeFileSystemPath, DecodeFileSystemPath
    + PAGETITLES, \
    + DecodeFileSystemPath
    from editors.Viewer import Viewer
    from PLCControler import PLCControler
    from dialogs import ProjectDialog
    --- a/ProjectController.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/ProjectController.py Fri Oct 06 17:52:34 2017 +0300
    @@ -27,14 +27,12 @@
    Beremiz Project Controller
    """
    import os
    -import sys
    import traceback
    import time
    from time import localtime
    import shutil
    import re
    import tempfile
    -from math import ceil
    from types import ListType
    from threading import Timer, Lock, Thread
    from datetime import datetime
    @@ -58,8 +56,7 @@
    from PLCControler import PLCControler
    from plcopen.structures import IEC_KEYWORDS
    import targets
    -from targets.typemapping import DebugTypesSize, \
    - LogLevelsCount, LogLevels, UnpackDebugBuffer
    +from targets.typemapping import DebugTypesSize, UnpackDebugBuffer
    from ConfigTreeNode import ConfigTreeNode, XSDSchemaErrorMessage
    base_folder = paths.AbsParentDir(__file__)
    --- a/canfestival/NetworkEditor.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/canfestival/NetworkEditor.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,6 @@
    import wx
    -from subindextable import EditingPanel
    from networkeditortemplate import NetworkEditorTemplate
    from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
    --- a/canfestival/canfestival.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/canfestival/canfestival.py Fri Oct 06 17:52:34 2017 +0300
    @@ -35,10 +35,6 @@
    from ConfigTreeNode import ConfigTreeNode
    from PLCControler import \
    LOCATION_CONFNODE, \
    - LOCATION_MODULE, \
    - LOCATION_GROUP, \
    - LOCATION_VAR_INPUT, \
    - LOCATION_VAR_OUTPUT, \
    LOCATION_VAR_MEMORY
    try:
    --- a/controls/CustomIntCtrl.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/CustomIntCtrl.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,7 @@
    import wx
    -from wx.lib.intctrl import IntCtrl
    +import wx.lib.intctrl
    class CustomIntUpdatedEvent(wx.PyCommandEvent):
    --- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -36,7 +36,6 @@
    from mpl_toolkits.mplot3d import Axes3D
    from editors.DebugViewer import REFRESH_PERIOD
    -from DebugVariableItem import DebugVariableItem
    from DebugVariableViewer import *
    from GraphButton import GraphButton
    --- a/controls/DebugVariablePanel/DebugVariablePanel.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/DebugVariablePanel/DebugVariablePanel.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,7 +23,6 @@
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    from types import TupleType
    -import math
    import numpy
    import wx
    --- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -26,7 +26,6 @@
    import wx
    -from DebugVariableItem import DebugVariableItem
    from DebugVariableViewer import DebugVariableViewer
    from GraphButton import GraphButton
    --- a/controls/DebugVariablePanel/DebugVariableViewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/DebugVariablePanel/DebugVariableViewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,9 +25,6 @@
    from collections import OrderedDict
    import wx
    -
    -import matplotlib
    -import matplotlib.pyplot
    from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
    from dialogs.ForceVariableDialog import ForceVariableDialog
    --- a/controls/VariablePanel.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/controls/VariablePanel.py Fri Oct 06 17:52:34 2017 +0300
    @@ -22,7 +22,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import os
    import re
    from types import TupleType, StringType, UnicodeType
    --- a/dialogs/AboutDialog.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/dialogs/AboutDialog.py Fri Oct 06 17:52:34 2017 +0300
    @@ -31,8 +31,6 @@
    """
    import os
    -import sys
    -import time
    import wx
    from wx.lib.agw.hyperlink import HyperLinkCtrl
    --- a/dialogs/BrowseLocationsDialog.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/dialogs/BrowseLocationsDialog.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,8 +23,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.#
    -import os
    -
    import wx
    from plcopen.structures import LOCATIONDATATYPES
    --- a/dialogs/DiscoveryDialog.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/dialogs/DiscoveryDialog.py Fri Oct 06 17:52:34 2017 +0300
    @@ -28,8 +28,6 @@
    import wx.lib.mixins.listctrl as listmix
    from zeroconf import ServiceBrowser, Zeroconf
    -import connectors
    -
    service_type = '_PYRO._tcp.local.'
    --- a/dialogs/LDPowerRailDialog.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/dialogs/LDPowerRailDialog.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,7 +25,7 @@
    import wx
    -from graphics.GraphicCommons import LEFTRAIL, RIGHTRAIL, LD_LINE_SIZE
    +from graphics.GraphicCommons import LEFTRAIL, RIGHTRAIL
    from graphics.LD_Objects import LD_PowerRail
    from BlockPreviewDialog import BlockPreviewDialog
    --- a/dialogs/SearchInProjectDialog.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/dialogs/SearchInProjectDialog.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,7 +23,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import re
    import wx
    from plcopen.plcopen import *
    from util.TranslationCatalogs import NoTranslate
    --- a/doc/conf.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/doc/conf.py Fri Oct 06 17:52:34 2017 +0300
    @@ -11,9 +11,6 @@
    # All configuration values have a default; values that are commented out
    # serve to show the default.
    -import sys
    -import os
    -
    # If extensions (or modules to document with autodoc) are in another directory,
    # add these directories to sys.path here. If the directory is relative to the
    # documentation root, use os.path.abspath to make it absolute, like shown here.
    --- a/docutil/dochtml.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/docutil/dochtml.py Fri Oct 06 17:52:34 2017 +0300
    @@ -22,7 +22,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import os
    import subprocess
    import wx
    import wx.html
    --- a/editors/ConfTreeNodeEditor.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/ConfTreeNodeEditor.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,7 +23,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import os
    import types
    import wx
    --- a/editors/LDViewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/LDViewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -22,7 +22,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import time
    from types import *
    import wx
    --- a/editors/ProjectNodeEditor.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/ProjectNodeEditor.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,7 +25,6 @@
    import wx
    from controls import ProjectPropertiesPanel, VariablePanel
    -from EditorPanel import EditorPanel
    from ConfTreeNodeEditor import ConfTreeNodeEditor
    --- a/editors/ResourceEditor.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/ResourceEditor.py Fri Oct 06 17:52:34 2017 +0300
    @@ -32,7 +32,7 @@
    from EditorPanel import EditorPanel
    from util.BitmapLibrary import GetBitmap
    from util.TranslationCatalogs import NoTranslate
    -from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS, DefaultType
    +from plcopen.structures import TestIdentifier, IEC_KEYWORDS
    # -------------------------------------------------------------------------------
    --- a/editors/TextViewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/TextViewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -29,9 +29,9 @@
    import wx.stc
    from graphics.GraphicCommons import ERROR_HIGHLIGHT, SEARCH_RESULT_HIGHLIGHT, REFRESH_HIGHLIGHT_PERIOD
    -from plcopen.structures import ST_BLOCK_START_KEYWORDS, ST_BLOCK_END_KEYWORDS, IEC_BLOCK_START_KEYWORDS, IEC_BLOCK_END_KEYWORDS, LOCATIONDATATYPES
    +from plcopen.structures import ST_BLOCK_START_KEYWORDS, IEC_BLOCK_START_KEYWORDS, LOCATIONDATATYPES
    from EditorPanel import EditorPanel
    -from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS
    +from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos
    # -------------------------------------------------------------------------------
    # Textual programs Viewer class
    --- a/editors/Viewer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/editors/Viewer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -22,7 +22,6 @@
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -import re
    import math
    from time import time as gettime
    from types import TupleType
    --- a/graphics/GraphicCommons.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/graphics/GraphicCommons.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,8 +25,6 @@
    from math import *
    from types import *
    -import datetime
    -from threading import Lock, Timer
    import wx
    from graphics.ToolTipProducer import ToolTipProducer
    --- a/plcopen/definitions.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/plcopen/definitions.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,7 @@
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    -from os.path import join, split, realpath
    +from os.path import join
    import util.paths as paths
    from util.TranslationCatalogs import NoTranslate
    sd = paths.AbsDir(__file__)
    --- a/plcopen/plcopen.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/plcopen/plcopen.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,6 @@
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    from types import *
    -import os
    import re
    from collections import OrderedDict
    --- a/py_ext/PythonFileCTNMixin.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/py_ext/PythonFileCTNMixin.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,7 +25,6 @@
    import os
    import re
    -from lxml import etree
    import util.paths as paths
    from xmlclass import GenerateParserFromXSD
    --- a/runtime/NevowServer.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/runtime/NevowServer.py Fri Oct 06 17:52:34 2017 +0300
    @@ -26,9 +26,8 @@
    from __future__ import print_function
    import os
    import util.paths as paths
    -from nevow import rend, appserver, inevow, tags, loaders, athena
    +from nevow import appserver, inevow, tags, loaders, athena
    from nevow.page import renderer
    -from twisted.python import util
    from twisted.internet import reactor
    xhtml_header = '''<?xml version="1.0" encoding="utf-8"?>
    --- a/runtime/PLCObject.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/runtime/PLCObject.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,15 +25,13 @@
    from threading import Timer, Thread, Lock, Semaphore, Event
    import ctypes
    import os
    -import commands
    -import types
    import sys
    import traceback
    from time import time
    import Pyro.core as pyro
    -from targets.typemapping import LogLevelsDefault, LogLevelsCount, TypeTranslator, UnpackDebugBuffer
    +from targets.typemapping import LogLevelsDefault, LogLevelsCount, TypeTranslator
    if os.name in ("nt", "ce"):
    --- a/runtime/WampClient.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/runtime/WampClient.py Fri Oct 06 17:52:34 2017 +0300
    @@ -23,7 +23,6 @@
    from __future__ import print_function
    -import sys
    import json
    from autobahn.twisted import wamp
    --- a/svgui/pyjs/build.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/pyjs/build.py Fri Oct 06 17:52:34 2017 +0300
    @@ -3,12 +3,10 @@
    from __future__ import print_function
    import sys
    import shutil
    -import time
    import re
    import os
    -from os.path import join, dirname, basename, abspath, split, isfile, isdir
    +from os.path import join, basename, abspath, split, isfile, isdir
    from hashlib import md5
    -from copy import copy
    from optparse import OptionParser
    from cStringIO import StringIO
    --- a/svgui/pyjs/jsonrpc/django/jsonrpc.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/pyjs/jsonrpc/django/jsonrpc.py Fri Oct 06 17:52:34 2017 +0300
    @@ -1,13 +1,8 @@
    # jsonrpc.py
    # original code: http://trac.pyworks.org/pyjamas/wiki/DjangoWithPyJamas
    # also from: http://www.pimentech.fr/technologies/outils
    -from datetime import date
    import datetime
    -import sys
    -from django.utils import simplejson
    -from django.http import HttpResponse
    -from django import forms
    from django.core.serializers import serialize
    --- a/svgui/pyjs/jsonrpc/jsonrpc.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/pyjs/jsonrpc/jsonrpc.py Fri Oct 06 17:52:34 2017 +0300
    @@ -1,4 +1,3 @@
    -import types
    import sys
    import gluon.contrib.simplejson as simplejson
    --- a/svgui/pyjs/lib/pyjslib.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/pyjs/lib/pyjslib.py Fri Oct 06 17:52:34 2017 +0300
    @@ -233,7 +233,7 @@
    # as comment on line 20 says
    # import sys should be below
    -import sys # noqa # pylint: disable=C0411
    +import sys # noqa # pylint: disable=C0411,W0611
    class BaseException:
    --- a/svgui/svgui.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/svgui.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,6 @@
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    import os
    -import sys
    import shutil
    import wx
    --- a/svgui/svgui_server.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/svgui/svgui_server.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,7 @@
    import os
    -from nevow import rend, appserver, inevow, tags, loaders, athena
    +from nevow import tags, loaders
    import simplejson as json
    svgfile = '%(svgfile)s'
    --- a/targets/toolchain_makefile.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/targets/toolchain_makefile.py Fri Oct 06 17:52:34 2017 +0300
    @@ -26,7 +26,6 @@
    import re
    import operator
    import hashlib
    -import time
    from util.ProcessLogger import ProcessLogger
    --- a/tests/tools/check_source.sh Thu Oct 05 16:46:29 2017 +0300
    +++ b/tests/tools/check_source.sh Fri Oct 06 17:52:34 2017 +0300
    @@ -217,10 +217,10 @@
    enable=$enable,E0102 # (function-redefined) method already defined
    enable=$enable,W0602 # (global-variable-not-assigned) Using global for 'X' but no assignment is done
    enable=$enable,W0612 # (unused-variable) Unused variable 'X'
    + enable=$enable,W0611 # (unused-import), Unused import connectors
    # enable=$enable,W0403 # relative import
    # enable=$enable,W0622 # (redefined-builtin) Redefining built-in
    - # enable=$enable,W0612 # unused-variable
    # enable=$enable,C1001 # (old-style-class) Old-style class defined. Problem with PyJS
    # enable=
    --- a/tests/tools/conftest.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/tests/tools/conftest.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,20 +24,26 @@
    import os
    import sys
    -import time
    -import pytest
    -import xvfbwrapper
    +# import pytest
    +# import xvfbwrapper
    +
    -# append module root directory to sys.path
    -sys.path.append(
    - os.path.abspath(
    - os.path.join(
    - os.path.dirname(__file__), '..', '..')
    - )
    -)
    +def init_environment():
    + """Append module root directory to sys.path"""
    + try:
    + import Beremiz as _Beremiz
    + except ImportError:
    + sys.path.append(
    + os.path.abspath(
    + os.path.join(
    + os.path.dirname(__file__), '..', '..')
    + )
    + )
    +init_environment()
    +
    #
    # Something seems to be broken in Beremiz application,
    # because after tests in test_application.py during Xvfb shutdown
    --- a/tests/tools/test_CustomIntCtrl.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/tests/tools/test_CustomIntCtrl.py Fri Oct 06 17:52:34 2017 +0300
    @@ -26,7 +26,6 @@
    import time
    import wx
    -
    import conftest
    import controls.CustomIntCtrl
    @@ -134,4 +133,5 @@
    if __name__ == '__main__':
    + conftest.init_environment()
    unittest.main()
    --- a/tests/tools/test_application.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/tests/tools/test_application.py Fri Oct 06 17:52:34 2017 +0300
    @@ -28,7 +28,6 @@
    import sys
    import unittest
    import time
    -import traceback
    import pytest
    import wx
    @@ -222,4 +221,5 @@
    if __name__ == '__main__':
    + conftest.init_environment()
    unittest.main()
    --- a/util/ProcessLogger.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/util/ProcessLogger.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,6 @@
    import os
    import sys
    -import time
    import subprocess
    import ctypes
    from threading import Timer, Lock, Thread, Semaphore
    --- a/util/TranslationCatalogs.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/util/TranslationCatalogs.py Fri Oct 06 17:52:34 2017 +0300
    @@ -24,7 +24,6 @@
    import os
    import __builtin__
    -import gettext
    import wx
    --- a/util/misc.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/util/misc.py Fri Oct 06 17:52:34 2017 +0300
    @@ -27,8 +27,6 @@
    """
    import os
    -import sys
    -import gettext
    def CheckPathPerm(path):
    --- a/xmlclass/xmlclass.py Thu Oct 05 16:46:29 2017 +0300
    +++ b/xmlclass/xmlclass.py Fri Oct 06 17:52:34 2017 +0300
    @@ -25,12 +25,11 @@
    from __future__ import print_function
    import os
    -import sys
    import re
    import datetime
    from types import *
    from xml.dom import minidom
    -from xml.sax.saxutils import escape, unescape, quoteattr
    +from xml.sax.saxutils import unescape
    from new import classobj
    from collections import OrderedDict