diff --git a/.bandit b/.bandit new file mode 100644 index 0000000..7db131d --- /dev/null +++ b/.bandit @@ -0,0 +1,2 @@ +[bandit] +exclude: tests,.tox diff --git a/.fussyfox.yml b/.fussyfox.yml new file mode 100644 index 0000000..cd2d518 --- /dev/null +++ b/.fussyfox.yml @@ -0,0 +1,2 @@ +- bandit +- flake8 diff --git a/.travis.yml b/.travis.yml index 9195e6e..9e07fe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ sudo: false cache: pip matrix: include: - - env: TOXENV=flake8-py27 - python: 2.7 - - env: TOXENV=flake8-py36 - python: 3.6 - env: TOXENV=readme-py27 python: 2.7 - env: TOXENV=py27-dj111-coverage diff --git a/setup.cfg b/setup.cfg index a8c18eb..28c24e9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,3 +7,7 @@ branch = 1 parallel = 1 [coverage:report] include = configurations/*,tests/* + +[flake8] +exclude = .tox,docs/* +ignore = E501,E127,E128,E124,W503 diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py index 1ffe526..295981c 100644 --- a/test_project/test_project/settings.py +++ b/test_project/test_project/settings.py @@ -84,7 +84,6 @@ class Base(Configuration): STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - # 'django.contrib.staticfiles.finders.DefaultStorageFinder', ) # Make this unique, and don't share it with anybody. diff --git a/test_project/test_project/urls.py b/test_project/test_project/urls.py index cc4356b..b23e2d5 100644 --- a/test_project/test_project/urls.py +++ b/test_project/test_project/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import patterns # Uncomment the next two lines to enable the admin: # from django.contrib import admin diff --git a/test_project/test_project/wsgi.py b/test_project/test_project/wsgi.py index b250403..1bdda28 100644 --- a/test_project/test_project/wsgi.py +++ b/test_project/test_project/wsgi.py @@ -20,7 +20,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") # This application object is used by any WSGI server configured to use this # file. This includes Django's development server, if the WSGI_APPLICATION # setting points here. -from django.core.wsgi import get_wsgi_application +from django.core.wsgi import get_wsgi_application # noqa application = get_wsgi_application() # Apply WSGI middleware here. diff --git a/tox.ini b/tox.ini index 0f8c5b3..233ad84 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,7 @@ usedevelop = true minversion = 1.8 whitelist_externals = sphinx-build envlist = - flake8-py27, - flake8-py36, + checkqa, readme-py27, py{27,34,35,36,py}-dj{18,110,111} py{34,35,36,37}-dj20 @@ -39,14 +38,10 @@ commands = commands = python setup.py check -r -s deps = readme_renderer -[testenv:flake8-py27] -commands = flake8 configurations tests -deps = flake8 - -[testenv:flake8-py36] -commands = flake8 configurations tests -deps = flake8 - -[flake8] -exclude = .tox -ignore = E501,E127,E128,E124,W503 +[testenv:checkqa] +commands = + flake8 {toxinidir} + bandit -r {toxinidir} +deps = + flake8 + bandit