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