remove reimported modules
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 22 Sep 2017 18:06:15 +0300
changeset 1829 a776ac02b079
parent 1828 396da88d7b5c
child 1830 e598d1acf354
remove reimported modules
BeremizIDE.py
Beremiz_service.py
svgui/pyjs/pyjs.py
tests/tools/check_source.sh
--- a/BeremizIDE.py	Fri Sep 22 16:37:38 2017 +0300
+++ b/BeremizIDE.py	Fri Sep 22 18:06:15 2017 +0300
@@ -39,9 +39,7 @@
 import wx.stc
 import cPickle
 import types
-import time
 import re
-import time
 import commands
 from threading import Lock, Timer, currentThread
 from time import time as gettime
--- a/Beremiz_service.py	Fri Sep 22 16:37:38 2017 +0300
+++ b/Beremiz_service.py	Fri Sep 22 18:06:15 2017 +0300
@@ -29,7 +29,7 @@
 import sys
 import getopt
 import threading
-from threading import Thread
+from threading import Thread, currentThread
 import traceback
 import __builtin__
 import Pyro.core as pyro
@@ -179,7 +179,6 @@
 
     if havewx:
         import re
-        from threading import Thread, currentThread
         from types import *
 
         if wx.VERSION >= (3, 0, 0):
@@ -478,7 +477,6 @@
     with warnings.catch_warnings():
         warnings.simplefilter("ignore")
         try:
-            from threading import Thread, currentThread
             if havewx:
                 from twisted.internet import wxreactor
                 wxreactor.install()
--- a/svgui/pyjs/pyjs.py	Fri Sep 22 16:37:38 2017 +0300
+++ b/svgui/pyjs/pyjs.py	Fri Sep 22 18:06:15 2017 +0300
@@ -1750,7 +1750,6 @@
 
 
 def main():
-    import sys
     if len(sys.argv) < 2:
         print(usage % sys.argv[0], file=sys.stderr)
         sys.exit(1)
--- a/tests/tools/check_source.sh	Fri Sep 22 16:37:38 2017 +0300
+++ b/tests/tools/check_source.sh	Fri Sep 22 18:06:15 2017 +0300
@@ -202,8 +202,11 @@
 
     enable=
     enable=$enable,E1601          # print statement used    
+    enable=$enable,C0325          # (superfluous-parens) Unnecessary parens after keyword
+    enable=$enable,W0404          # reimported module    
+
     # enable=$enable,W0403        # relative import
-    enable=$enable,C0325        # (superfluous-parens) Unnecessary parens after keyword
+
     # enable=
 
     options=