From 43e30707be638e6f07742d1397f4a47f39331d83 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Mon, 30 Jan 2017 01:26:50 +0100 Subject: [PATCH] add flake8 config --- setup.cfg | 4 ++++ setup.py | 13 ++++++++++++- tox.ini | 7 ++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 654c47d..e8da255 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,3 +5,7 @@ with-doctest=1 [bdist_wheel] # This flag says that the code is written to work on both Python 2 and Python 3. universal=1 + +[flake8] +exclude = .git,.tox,.github,.eggs,__pycache__,doc/conf.py,build,dist,capabilities-data,test +max-line-length = 100 \ No newline at end of file diff --git a/setup.py b/setup.py index 9d00261..7fe0c78 100755 --- a/setup.py +++ b/setup.py @@ -118,7 +118,18 @@ setup( setup_requires=[ 'setuptools_scm', ], - tests_require=['jaconv', 'tox', 'pytest', 'pytest-cov', 'pytest-mock', 'nose', 'scripttest', 'mock', 'hypothesis'], + tests_require=[ + 'jaconv', + 'tox', + 'pytest', + 'pytest-cov', + 'pytest-mock', + 'nose', + 'scripttest', + 'mock', + 'hypothesis', + 'flake8' + ], cmdclass={'test': Tox}, entry_points={ 'console_scripts': [ diff --git a/tox.ini b/tox.ini index 7c9e8ca..f2d6389 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27, py34, py35, docs +envlist = py27, py34, py35, docs, flake8 [testenv] deps = nose @@ -19,3 +19,8 @@ changedir = doc deps = sphinx>=1.5.1 setuptools_scm commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html + +[testenv:flake8] +basepython = python +deps = flake8 +commands = flake8