[PATCH 38 of 52 Narval cube] [autopep8] E402 - Fix module level import not at top of file

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:38 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585460437 0
#      Sun Mar 29 05:40:37 2020 +0000
# Node ID 8530a5bb66a5865dab438ede429cda6eefa30ca9
# Parent  a62d1bc96c9990178e6aba01e0c327c4b74f12ef
[autopep8] E402 - Fix module level import not at top of file

diff --git a/cubicweb_narval/narvalbot/main.py b/cubicweb_narval/narvalbot/main.py
--- a/cubicweb_narval/narvalbot/main.py
+++ b/cubicweb_narval/narvalbot/main.py
@@ -19,6 +19,7 @@
 
 __docformat__ = "restructuredtext en"
 
+from . import NarvalConfiguration
 from logilab.common import clcommands as cl
 
 from cubicweb_narval.__pkginfo__ import version
@@ -26,7 +27,6 @@
 NARVAL = cl.CommandLine('narval', doc='Control Narval agents.', version=version)
 ENGINE = None  # global making engine accessible **for testing purpose**
 
-from . import NarvalConfiguration
 
 
 class StartCommand(cl.Command):
diff --git a/cubicweb_narval/site_cubicweb.py b/cubicweb_narval/site_cubicweb.py
--- a/cubicweb_narval/site_cubicweb.py
+++ b/cubicweb_narval/site_cubicweb.py
@@ -1,4 +1,5 @@
 
+from rql.utils import register_function, FunctionDescr
 options = (
     # XXX only for all-in-one or repository config
     ('plan-cleanup-delay',
@@ -11,7 +12,6 @@
       }),
 )
 
-from rql.utils import register_function, FunctionDescr
 
 
 class is_null(FunctionDescr):
diff --git a/cubicweb_narval/testutils.py b/cubicweb_narval/testutils.py
--- a/cubicweb_narval/testutils.py
+++ b/cubicweb_narval/testutils.py
@@ -16,6 +16,8 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+from narvalbot import server, main
+import narvalbot as bot
 import os
 import sys
 import subprocess
@@ -31,8 +33,6 @@
 
 sys.modules['narvalbot'] = narvalbot
 
-import narvalbot as bot
-from narvalbot import server, main
 
 
 os.killpg = lambda x, y: None




More information about the cubicweb-devel mailing list