clean-up: fix PEP8 E401 multiple imports on one line
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 14 Aug 2017 21:20:32 +0300
changeset 1732 94ffe74e6895
parent 1731 6ebd9c40b2be
child 1733 dea107dce0c4
clean-up: fix PEP8 E401 multiple imports on one line
Beremiz.py
BeremizIDE.py
Beremiz_service.py
CodeFileTreeNode.py
ConfigTreeNode.py
IDEFrame.py
PLCControler.py
PLCOpenEditor.py
ProjectController.py
canfestival/canfestival.py
canfestival/config_utils.py
connectors/WAMP/__init__.py
doc/conf.py
docutil/dochtml.py
docutil/docpdf.py
docutil/docsvg.py
plcopen/plcopen.py
plcopen/structures.py
py_ext/PythonFileCTNMixin.py
runtime/PLCObject.py
runtime/ServicePublisher.py
svgui/svgui.py
targets/toolchain_gcc.py
targets/toolchain_makefile.py
util/ProcessLogger.py
util/misc.py
util/paths.py
version.py
wxglade_hmi/wxglade_hmi.py
xmlclass/xmlclass.py
xmlclass/xsdschema.py
--- a/Beremiz.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/Beremiz.py	Mon Aug 14 21:20:32 2017 +0300
@@ -24,7 +24,9 @@
 
 
 
-import os, sys, getopt
+import os
+import sys
+import getopt
 import time
 import __builtin__
 import util.paths as paths
--- a/BeremizIDE.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/BeremizIDE.py	Mon Aug 14 21:20:32 2017 +0300
@@ -24,12 +24,14 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
-import os, sys
+import os
+import sys
 import tempfile
 import shutil
 import random
 import time
 import version
+
 import util.paths as paths
 from types import ListType
 
@@ -40,9 +42,17 @@
 
 
 
-import wx.lib.buttons, wx.lib.statbmp, wx.stc
+import wx.lib.buttons
+import wx.lib.statbmp
+import wx.stc
 import cPickle
-import types, time, re, platform, time, traceback, commands
+import types
+import time
+import re
+import platform
+import time
+import traceback
+import commands
 
 from docutil import OpenHtmlFrame
 from editors.EditorPanel import EditorPanel
@@ -1071,7 +1081,8 @@
 #-------------------------------------------------------------------------------
 #                               Exception Handler
 #-------------------------------------------------------------------------------
-import threading, traceback
+import threading
+import traceback
 
 Max_Traceback_List_Size = 20
 
--- a/Beremiz_service.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/Beremiz_service.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,9 @@
 # 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, sys, getopt
+import os
+import sys
+import getopt
 from threading import Thread
 
 def usage():
@@ -524,7 +526,8 @@
 
 
 # Exception hooks s
-import threading, traceback
+import threading
+import traceback
 def LogException(*exp):
     if pyroserver.plcobj is not None:
         pyroserver.plcobj.LogMessage(0,'\n'.join(traceback.format_exception(*exp)))
--- a/CodeFileTreeNode.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/CodeFileTreeNode.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,9 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
-import os, re, traceback
+import os
+import re
+import traceback
 
 from copy import deepcopy
 from lxml import etree
--- a/ConfigTreeNode.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/ConfigTreeNode.py	Mon Aug 14 21:20:32 2017 +0300
@@ -31,7 +31,9 @@
 - ... TODO : document
 """
 
-import os,traceback,types
+import os
+import traceback
+import types
 import shutil
 from lxml import etree
 
--- a/IDEFrame.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/IDEFrame.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,11 +22,13 @@
 # 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, sys
+import os
+import sys
 import cPickle
 from types import TupleType
 
-import wx, wx.grid
+import wx
+import wx.grid
 import wx.aui
 
 from editors.EditorPanel import EditorPanel
--- a/PLCControler.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/PLCControler.py	Mon Aug 14 21:20:32 2017 +0300
@@ -27,7 +27,9 @@
 from types import StringType, UnicodeType, TupleType
 from lxml import etree
 from copy import deepcopy
-import os,sys,re
+import os
+import sys
+import re
 import datetime
 import util.paths as paths
 from time import localtime
--- a/PLCOpenEditor.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/PLCOpenEditor.py	Mon Aug 14 21:20:32 2017 +0300
@@ -24,7 +24,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 import wx
-import os, sys, platform, time, traceback, getopt
+import os
+import sys
+import platform
+import time
+import traceback
+import getopt
 import version
 import util.paths as paths
 
--- a/ProjectController.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/ProjectController.py	Mon Aug 14 21:20:32 2017 +0300
@@ -26,12 +26,15 @@
 """
 Beremiz Project Controller
 """
-import os,sys,traceback
+import os
+import sys
+import traceback
 import time
 import features
 import shutil
 import wx
-import re, tempfile
+import re
+import tempfile
 from math import ceil
 from types import ListType
 from threading import Timer, Lock, Thread
--- a/canfestival/canfestival.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/canfestival/canfestival.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +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.
 
-import os, sys, shutil
+import os
+import sys
+import shutil
+
 import util.paths as paths
 
 base_folder = paths.AbsParentDir(__file__, 2)
@@ -34,7 +37,9 @@
 
 from nodelist import NodeList
 from nodemanager import NodeManager
-import config_utils, gen_cfile, eds_utils
+import config_utils
+import gen_cfile
+import eds_utils
 import canfestival_config as local_canfestival_config
 from ConfigTreeNode import ConfigTreeNode
 from commondialogs import CreateNodeDialog
--- a/canfestival/config_utils.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/canfestival/config_utils.py	Mon Aug 14 21:20:32 2017 +0300
@@ -650,7 +650,9 @@
     return pointers
 
 if __name__ == "__main__":
-    import os, sys, getopt
+    import os
+    import sys
+    import getopt
 
     def usage():
         print """
--- a/connectors/WAMP/__init__.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/connectors/WAMP/__init__.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import sys, traceback, atexit
+import sys
+import traceback
+import atexit
 #from twisted.python import log
 from twisted.internet import reactor, threads
 from autobahn.twisted import wamp
--- a/doc/conf.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/doc/conf.py	Mon Aug 14 21:20:32 2017 +0300
@@ -11,7 +11,8 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os
+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
--- a/docutil/dochtml.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/docutil/dochtml.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import wx, os, wx.html, subprocess
+import os
+import subprocess
+import wx
+import wx.html
 
 HtmlFrameOpened = []
 
--- a/docutil/docpdf.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/docutil/docpdf.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import wx, os
+import os
+import wx
+
 
 readerexepath = None
     
--- a/docutil/docsvg.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/docutil/docsvg.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import wx, os, subprocess
+import wx
+import os
+import subprocess
 
 def get_inkscape_path():
     """ Return the Inkscape path """
--- a/plcopen/plcopen.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/plcopen/plcopen.py	Mon Aug 14 21:20:32 2017 +0300
@@ -25,7 +25,8 @@
 
 from xmlclass import *
 from types import *
-import os, re
+import os
+import re
 from lxml import etree
 from collections import OrderedDict
 import util.paths as paths
--- a/plcopen/structures.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/plcopen/structures.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import string, re
+import string
+import re
 from plcopen import LoadProject
 from collections import OrderedDict
 from definitions import *
--- a/py_ext/PythonFileCTNMixin.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/py_ext/PythonFileCTNMixin.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,8 @@
 # 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, re
+import os
+import re
 from lxml import etree
 import util.paths as paths
 
--- a/runtime/PLCObject.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/runtime/PLCObject.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,11 @@
 
 import Pyro.core as pyro
 from threading import Timer, Thread, Lock, Semaphore, Event
-import ctypes, os, commands, types, sys
+import ctypes
+import os
+import commands
+import types
+import sys
 from targets.typemapping import LogLevelsDefault, LogLevelsCount, TypeTranslator, UnpackDebugBuffer
 from time import time
 
--- a/runtime/ServicePublisher.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/runtime/ServicePublisher.py	Mon Aug 14 21:20:32 2017 +0300
@@ -21,7 +21,8 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-import socket, threading
+import socket
+import threading
 from util import Zeroconf
 
 service_type = '_PYRO._tcp.local.'
--- a/svgui/svgui.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/svgui/svgui.py	Mon Aug 14 21:20:32 2017 +0300
@@ -24,7 +24,9 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 import wx
-import os, sys, shutil
+import os
+import sys
+import shutil
 
 from pyjs import translate
 
--- a/targets/toolchain_gcc.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/targets/toolchain_gcc.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,9 @@
 # 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, re, operator
+import os
+import re
+import operator
 from util.ProcessLogger import ProcessLogger
 import hashlib
 
--- a/targets/toolchain_makefile.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/targets/toolchain_makefile.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,9 @@
 # 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, re, operator
+import os
+import re
+import operator
 from util.ProcessLogger import ProcessLogger
 import hashlib
 
--- a/util/ProcessLogger.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/util/ProcessLogger.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,11 +22,13 @@
 # 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 time
 import wx
-import subprocess, ctypes
+import subprocess
+import ctypes
 from threading import Timer, Lock, Thread, Semaphore
-import os, sys
 if os.name == 'posix':
     from signal import SIGTERM, SIGKILL
 
--- a/util/misc.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/util/misc.py	Mon Aug 14 21:20:32 2017 +0300
@@ -26,7 +26,8 @@
 Misc definitions
 """
 
-import os,sys
+import os
+import sys
 
 # helper func to check path write permission
 def CheckPathPerm(path):
--- a/util/paths.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/util/paths.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,8 @@
 # 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, sys
+import os
+import sys
 
 def AbsFile(file):
     if isinstance(file, str):
--- a/version.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/version.py	Mon Aug 14 21:20:32 2017 +0300
@@ -23,7 +23,9 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 
-import subprocess, os
+import subprocess
+import os
+
 import util.paths as paths
 
 def GetCommunityHelpMsg():
--- a/wxglade_hmi/wxglade_hmi.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/wxglade_hmi/wxglade_hmi.py	Mon Aug 14 21:20:32 2017 +0300
@@ -24,7 +24,9 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 import wx
-import os, sys, shutil
+import os
+import sys
+import shutil
 from xml.dom import minidom
 
 import util.paths as paths
--- a/xmlclass/xmlclass.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/xmlclass/xmlclass.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,8 @@
 # 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, sys
+import os
+import sys
 import re
 import datetime
 from types import *
--- a/xmlclass/xsdschema.py	Mon Aug 14 21:09:48 2017 +0300
+++ b/xmlclass/xsdschema.py	Mon Aug 14 21:20:32 2017 +0300
@@ -22,7 +22,8 @@
 # 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, re
+import os
+import re
 import datetime
 from xml.dom import minidom
 from types import *