fix pylint warning '(wrong-import-position) Import "import X" should be placed at the top of the module'
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 10 Oct 2017 13:33:46 +0300
changeset 1859 1df77c809257
parent 1858 4c5156dee87a
child 1860 4eeddef7f973
fix pylint warning '(wrong-import-position) Import "import X" should be placed at the top of the module'
controls/DebugVariablePanel/DebugVariablePanel.py
svgui/pyjs/lib/pyjslib.py
tests/tools/check_source.sh
--- a/controls/DebugVariablePanel/DebugVariablePanel.py	Tue Oct 10 13:21:48 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py	Tue Oct 10 13:33:46 2017 +0300
@@ -30,6 +30,8 @@
 import wx
 import wx.lib.buttons
 
+
+# pylint: disable=wrong-import-position
 import matplotlib
 matplotlib.use('WX')   # noqa
 import matplotlib.pyplot
--- a/svgui/pyjs/lib/pyjslib.py	Tue Oct 10 13:21:48 2017 +0300
+++ b/svgui/pyjs/lib/pyjslib.py	Tue Oct 10 13:33:46 2017 +0300
@@ -232,7 +232,7 @@
 
 # as comment on line 20 says
 # import sys should be below
-import sys  # noqa # pylint: disable=C0411,W0611
+import sys  # noqa # pylint: disable=wrong-import-order,unused-import,wrong-import-position
 
 
 class BaseException:
--- a/tests/tools/check_source.sh	Tue Oct 10 13:21:48 2017 +0300
+++ b/tests/tools/check_source.sh	Tue Oct 10 13:33:46 2017 +0300
@@ -236,6 +236,7 @@
     enable=$enable,W0104          # (pointless-statement) Statement seems to have no effect
     enable=$enable,W0107          # (unnecessary-pass) Unnecessary pass statement
     enable=$enable,W0406          # (import-self) Module import itself
+    enable=$enable,C0413          # (wrong-import-position) Import "import X" should be placed at the top of the module
     # enable=
 
     options=