diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2018-09-09 17:56:01 -0700 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2018-09-09 18:57:31 -0700 |
commit | 096b25569bb00aa74924aa405a1f0ddbe03e8ed0 (patch) | |
tree | f970a722d1b20d70a698a6794bb6aeb680f2c101 | |
parent | 39643fddfcb11de9acbe69620bf308e1b099d727 (diff) | |
download | natsort-096b25569bb00aa74924aa405a1f0ddbe03e8ed0.tar.gz |
Create special flake8 env for tox.
Rather than doing style and quality checking on every python version,
it will be done once in one version. More checks will be added, and
flake8 will be the driver (because of its plugins).
This will close issue #68.
-rw-r--r-- | Pipfile | 12 | ||||
-rw-r--r-- | setup.cfg | 20 | ||||
-rw-r--r-- | tox.ini | 14 |
3 files changed, 19 insertions, 27 deletions
@@ -1,11 +1,9 @@ [dev-packages] -coverage = "*" -pytest = ">=3.5" -pytest-cov = "*" -pytest-flakes = "*" -pytest-pep8 = "*" -pytest-mock = ">=1.1" -hypothesis = ">=3.8.0" +coverage = "*" +pytest = ">=3.5" +pytest-cov = "*" +pytest-mock = ">=1.1" +hypothesis = ">=3.8.0" pytest-faulthandler = {version = "*", platform_python_implementation = "== 'CPython'"} # These packages are standard on newer python versions. @@ -49,21 +49,5 @@ formats = gztar search = XX-XX-XXXX v. X.X.X replace = {now:%%m-%%d-%%Y} v. {new_version} -[tool:pytest] -flakes-ignore = - natsort/compat/py23.py UndefinedName - natsort/__init__.py UnusedImport - natsort/compat/* UnusedImport - docs/source/conf.py ALL - test_natsort/test_natsort.py UnusedImport RedefinedWhileUnused - test_natsort/test_locale_help.py UnusedImport RedefinedWhileUnused - test_natsort/compat/* UnusedImport -pep8ignore = - natsort/ns_enum.py E126 E241 E123 E221 - test_natsort/test_*.py E501 E241 E221 - test_natsort/test_natsort_keygen.py E501 E241 E221 E701 - test_natsort/profile_natsorted.py ALL - docs/source/conf.py ALL - * W503 -pep8maxlinelength = 90 - +[flake8] +max-line-length = 90 @@ -5,7 +5,7 @@ [tox] envlist = - py27, py34, py35, py36, py37, pypy + flake8, py27, py34, py35, py36, py37, pypy # Other valid evironments are: # docs # release @@ -29,7 +29,16 @@ commands = pytest README.rst docs/source/intro.rst docs/source/examples.rst pytest --doctest-modules {envsitepackagesdir}/natsort # Full test suite. Allow the user to pass command-line objects. - pytest --flakes --pep8 --tb=short --cov {envsitepackagesdir}/natsort --cov-report term-missing {posargs:} + pytest --tb=short --cov {envsitepackagesdir}/natsort --cov-report term-missing {posargs:} + +# Check code quality. +[testenv:flake8] +deps = + flake8 + flake8-import-order + flake8-bugbear + pep8-naming +commands = flake8 # Build documentation. [testenv:docs] @@ -39,6 +48,7 @@ deps = commands = {envpython} setup.py build_sphinx +# Release the code to PyPI [testenv:release] deps = twine |