[tox] Drop "exclude" option from flake8 config and adjust flake8-ok-files.txt accordingly
authorDenis Laxalde <denis.laxalde@logilab.fr>
Fri, 20 Jan 2017 14:32:34 +0100
changeset 11911 37726f66ff82
parent 11910 af969080e7e6
child 11912 c9e6df20e5a4
[tox] Drop "exclude" option from flake8 config and adjust flake8-ok-files.txt accordingly Some files listed in flake8-ok-files.txt were excluded of flake8 run because of the "exclude" option in tox.ini. Some of them were non-existent files (moved), some others were actually non-flake8-compliant. In the latter case, we adjust trivial errors (blank lines, module import not on top of file) but remove others (like cubicweb/test/unittest_utils.py) from flake8-ok-files.txt.
cubicweb/dataimport/test/test_massive_store.py
cubicweb/hooks/test/unittest_security.py
cubicweb/server/test/unittest_checkintegrity.py
cubicweb/test/data/views.py
cubicweb/test/data_schemareader/schema.py
cubicweb/test/unittest_schema.py
cubicweb/web/test/unittest_http_headers.py
flake8-ok-files.txt
tox.ini
--- a/cubicweb/dataimport/test/test_massive_store.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/dataimport/test/test_massive_store.py	Fri Jan 20 14:32:34 2017 +0100
@@ -16,8 +16,6 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """Massive store test case"""
 
-import itertools
-
 from cubicweb.devtools import testlib, PostgresApptestConfiguration
 from cubicweb.devtools import startpgcluster, stoppgcluster
 from cubicweb.dataimport import ucsvreader, stores
--- a/cubicweb/hooks/test/unittest_security.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/hooks/test/unittest_security.py	Fri Jan 20 14:32:34 2017 +0100
@@ -51,6 +51,7 @@
                     cnx.commit()
                     self.assertEqual(email.sender[0].eid, self.add_eid)
 
+
 if __name__ == '__main__':
     from logilab.common.testlib import unittest_main
     unittest_main()
--- a/cubicweb/server/test/unittest_checkintegrity.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/server/test/unittest_checkintegrity.py	Fri Jan 20 14:32:34 2017 +0100
@@ -25,9 +25,9 @@
 else:
     from io import StringIO
 
-from cubicweb import devtools
-from cubicweb.devtools.testlib import CubicWebTC
-from cubicweb.server.checkintegrity import check, check_indexes, reindex_entities
+from cubicweb import devtools  # noqa: E402
+from cubicweb.devtools.testlib import CubicWebTC  # noqa: E402
+from cubicweb.server.checkintegrity import check, check_indexes, reindex_entities  # noqa: E402
 
 
 class CheckIntegrityTC(unittest.TestCase):
--- a/cubicweb/test/data/views.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/test/data/views.py	Fri Jan 20 14:32:34 2017 +0100
@@ -15,12 +15,13 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-from cubicweb.web.views import xmlrss
-xmlrss.RSSIconBox.visible = True
-
 
 from cubicweb.predicates import match_user_groups
 from cubicweb.server import Service
+from cubicweb.web.views import xmlrss
+
+
+xmlrss.RSSIconBox.visible = True
 
 
 class TestService(Service):
--- a/cubicweb/test/data_schemareader/schema.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/test/data_schemareader/schema.py	Fri Jan 20 14:32:34 2017 +0100
@@ -11,6 +11,7 @@
         'CWSource', inlined=True, cardinality='1*', composite='object',
         __permissions__=RELATION_MANAGERS_PERMISSIONS)
 
+
 cw_for_source = CWSourceSchemaConfig.get_relation('cw_for_source')
 cw_for_source.__permissions__ = {'read': ('managers', 'users'),
                                  'add': ('managers',),
--- a/cubicweb/test/unittest_schema.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/test/unittest_schema.py	Fri Jan 20 14:32:34 2017 +0100
@@ -601,5 +601,6 @@
             self.assertEqual(found, None)
             self.assertEqual(keyarg, None)
 
+
 if __name__ == '__main__':
     unittest_main()
--- a/cubicweb/web/test/unittest_http_headers.py	Fri Jan 20 10:31:04 2017 +0100
+++ b/cubicweb/web/test/unittest_http_headers.py	Fri Jan 20 14:32:34 2017 +0100
@@ -13,6 +13,7 @@
         with self.assertRaises(ValueError):
             http_headers.generateTrueFalse('any value')
 
+
 if __name__ == '__main__':
     from unittest import main
     main()
--- a/flake8-ok-files.txt	Fri Jan 20 10:31:04 2017 +0100
+++ b/flake8-ok-files.txt	Fri Jan 20 14:32:34 2017 +0100
@@ -26,7 +26,7 @@
 cubicweb/etwist/service.py
 cubicweb/ext/__init__.py
 cubicweb/hooks/test/data/hooks.py
-cubicweb/hooks/test/unittest_notification.py
+cubicweb/hooks/test/unittest_notificationhooks.py
 cubicweb/hooks/test/unittest_security.py
 cubicweb/hooks/test/unittest_syncsession.py
 cubicweb/pylintext.py
@@ -47,26 +47,25 @@
 cubicweb/server/test/data-schema2sql/__init__.py
 cubicweb/server/test/unittest_checkintegrity.py
 cubicweb/server/test/unittest_ldapsource.py
-cubicweb/skeleton/test/pytestconf.py
 cubicweb/sobjects/test/unittest_notification.py
 cubicweb/sobjects/test/unittest_register_user.py
 cubicweb/sobjects/textparsers.py
-cubicweb/test/data/cubes/comment/__init__.py
-cubicweb/test/data/cubes/comment/__pkginfo__.py
-cubicweb/test/data/cubes/email/entities.py
-cubicweb/test/data/cubes/email/hooks.py
-cubicweb/test/data/cubes/email/__init__.py
-cubicweb/test/data/cubes/email/__pkginfo__.py
-cubicweb/test/data/cubes/email/views/__init__.py
-cubicweb/test/data/cubes/file/entities/__init__.py
-cubicweb/test/data/cubes/file/hooks/__init__.py
-cubicweb/test/data/cubes/file/__init__.py
-cubicweb/test/data/cubes/file/__pkginfo__.py
-cubicweb/test/data/cubes/file/views.py
-cubicweb/test/data/cubes/forge/__init__.py
-cubicweb/test/data/cubes/forge/__pkginfo__.py
-cubicweb/test/data/cubes/mycube/__init__.py
-cubicweb/test/data/cubes/mycube/__pkginfo__.py
+cubicweb/test/data/libpython/cubicweb_comment/__init__.py
+cubicweb/test/data/libpython/cubicweb_comment/__pkginfo__.py
+cubicweb/test/data/libpython/cubicweb_email/entities.py
+cubicweb/test/data/libpython/cubicweb_email/hooks.py
+cubicweb/test/data/libpython/cubicweb_email/__init__.py
+cubicweb/test/data/libpython/cubicweb_email/__pkginfo__.py
+cubicweb/test/data/libpython/cubicweb_email/views/__init__.py
+cubicweb/test/data/libpython/cubicweb_file/entities/__init__.py
+cubicweb/test/data/libpython/cubicweb_file/hooks/__init__.py
+cubicweb/test/data/libpython/cubicweb_file/__init__.py
+cubicweb/test/data/libpython/cubicweb_file/__pkginfo__.py
+cubicweb/test/data/libpython/cubicweb_file/views.py
+cubicweb/test/data/libpython/cubicweb_forge/__init__.py
+cubicweb/test/data/libpython/cubicweb_forge/__pkginfo__.py
+cubicweb/test/data/libpython/cubicweb_mycube/__init__.py
+cubicweb/test/data/libpython/cubicweb_mycube/__pkginfo__.py
 cubicweb/test/data/migration/0.1.0_common.py
 cubicweb/test/data/migration/0.1.0_repository.py
 cubicweb/test/data_schemareader/schema.py
@@ -79,7 +78,6 @@
 cubicweb/test/unittest_rtags.py
 cubicweb/test/unittest_schema.py
 cubicweb/test/unittest_toolsutils.py
-cubicweb/test/unittest_utils.py
 cubicweb/web/formwidgets.py
 cubicweb/web/test/data/entities.py
 cubicweb/web/test/unittest_http_headers.py
--- a/tox.ini	Fri Jan 20 10:31:04 2017 +0100
+++ b/tox.ini	Fri Jan 20 14:32:34 2017 +0100
@@ -53,7 +53,7 @@
 format = pylint
 ignore = W503
 max-line-length = 100
-exclude = setup.py,doc/*,cubicweb/misc/*,cubicweb/test/*,cubicweb/*/test/*,.tox/*
+exclude = doc/*,.tox/*
 
 
 # vim: wrap sts=2 sw=2