autopep8: E402 module level import not at top of file
authorSimon Chabot <simon.chabot@logilab.fr>
Wed, 13 Feb 2019 18:36:40 +0100
changeset 856 269164a1371a
parent 855 c313ddea4a3e
child 857 828267b58082
autopep8: E402 module level import not at top of file Fixing E402 implied running autopep8 for : - E404 from __future__ imports must occur at the beginning of the file - E303 too many blank lines
__pkginfo__.py
rql/parser.py
rql/utils.py
test/unittest_nodes.py
test/unittest_stcheck.py
tox.ini
--- a/__pkginfo__.py	Wed Feb 13 18:28:29 2019 +0100
+++ b/__pkginfo__.py	Wed Feb 13 18:36:40 2019 +0100
@@ -17,6 +17,12 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with rql. If not, see <http://www.gnu.org/licenses/>.
 """RQL packaging information."""
+
+import sys
+import subprocess
+import os.path as osp
+from distutils.core import Extension
+
 __docformat__ = "restructuredtext en"
 
 modname = "rql"
@@ -44,10 +50,6 @@
     'Topic :: Software Development :: Libraries :: Python Modules',
 ]
 
-import os.path as osp
-import subprocess
-import sys
-from distutils.core import Extension
 
 include_dirs = []
 
--- a/rql/parser.py	Wed Feb 13 18:28:29 2019 +0100
+++ b/rql/parser.py	Wed Feb 13 18:36:40 2019 +0100
@@ -45,8 +45,13 @@
 
 """
 
+from __future__ import print_function
+from warnings import warn
+
+from rql.nodes import *
+from rql.stmts import Union, Select, Delete, Insert, Set
+
 # Begin -- grammar generated by Yapps
-from __future__ import print_function
 import sys
 import re
 from yapps import runtime
@@ -715,11 +720,6 @@
 # End -- grammar generated by Yapps
 
 
-from warnings import warn
-from rql.stmts import Union, Select, Delete, Insert, Set
-from rql.nodes import *
-
-
 def unquote(string):
     """Remove quotes from a string."""
     if string.startswith('"'):
--- a/rql/utils.py	Wed Feb 13 18:28:29 2019 +0100
+++ b/rql/utils.py	Wed Feb 13 18:36:40 2019 +0100
@@ -17,10 +17,13 @@
 # with rql. If not, see <http://www.gnu.org/licenses/>.
 """Miscellaneous utilities for RQL."""
 
-__docformat__ = "restructuredtext en"
+from logilab.database import SQL_FUNCTIONS_REGISTRY, FunctionDescr, CAST
+from logilab.common.decorators import monkeypatch
 
 from rql._exceptions import BadRQLQuery
 
+__docformat__ = "restructuredtext en"
+
 UPPERCASE = u'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 
@@ -74,9 +77,6 @@
                 'LIMIT', 'OFFSET'))
 
 
-from logilab.common.decorators import monkeypatch
-from logilab.database import SQL_FUNCTIONS_REGISTRY, FunctionDescr, CAST
-
 RQL_FUNCTIONS_REGISTRY = SQL_FUNCTIONS_REGISTRY.copy()
 
 
--- a/test/unittest_nodes.py	Wed Feb 13 18:28:29 2019 +0100
+++ b/test/unittest_nodes.py	Wed Feb 13 18:36:40 2019 +0100
@@ -24,10 +24,10 @@
 from logilab.common.testlib import TestCase, unittest_main
 
 from rql import nodes, stmts, parse, BadRQLQuery, RQLHelper, RQLException, CoercionError
+from rql.stcheck import RQLSTAnnotator
 
 from unittest_analyze import DummySchema
 schema = DummySchema()
-from rql.stcheck import RQLSTAnnotator
 annotator = RQLSTAnnotator(schema, {})
 helper = RQLHelper(schema, None, {'eid': 'uid'})
 
--- a/test/unittest_stcheck.py	Wed Feb 13 18:28:29 2019 +0100
+++ b/test/unittest_stcheck.py	Wed Feb 13 18:36:40 2019 +0100
@@ -15,19 +15,18 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with rql. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
 
+from __future__ import print_function
 import six
 
+from rql import RQLHelper, BadRQLQuery, stmts, nodes
+from unittest_analyze import DummySchema
+
 if six.PY2:
     import unittest2 as unittest
 else:
     import unittest
 
-from rql import RQLHelper, BadRQLQuery, stmts, nodes
-
-from unittest_analyze import DummySchema
-
 BAD_QUERIES = (
     'Any X, Y GROUPBY X',
 
--- a/tox.ini	Wed Feb 13 18:28:29 2019 +0100
+++ b/tox.ini	Wed Feb 13 18:36:40 2019 +0100
@@ -11,7 +11,7 @@
 basepython = python3
 deps =
   flake8
-commands = flake8 {posargs:--ignore=E402,E501,E731,E741,F401,F401,F403,F405,F811,F821,F841,E123,E226,W503,E241,W504,E126,E121}
+commands = flake8 {posargs:--ignore=E501,E731,E741,F401,F401,F403,F405,F811,F821,F841,E123,E226,W503,E241,W504,E126,E121}
 
 [pytest]
 python_files = *test_*.py