Skip to content

Commit

Permalink
- add linting and Python 3.9 test configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jul 12, 2020
1 parent c2cbd1a commit 8d4a732
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
[bdist_wheel]
universal = 1

[isort]
force_single_line = True
combine_as_imports = True
line_length = 79
lines_after_imports = 2

[flake8]
no-accept-encodings = True
exclude =
bootstrap.py

[coverage:run]
branch = True
source = src
Expand Down
42 changes: 41 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ envlist =
py36,
py37,
py38,
py39,
pypy,
pypy3,
lint,
coverage

[testenv]
commands =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
coverage run {envbindir}/test {posargs:-cv}
deps =
Expand All @@ -25,6 +26,15 @@ skip_install = true
basepython = python3.6
skip_install = true
deps = coverage
depends =
py27,
py35,
py36,
py37,
py38,
py39,
pypy,
pypy3,
setenv =
COVERAGE_FILE=.coverage
commands =
Expand All @@ -33,3 +43,33 @@ commands =
coverage html
coverage xml
coverage report

[testenv:lint]
basepython = python3.6
skip_install = true

deps =
isort
flake8
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
flake8-deprecated
flake8-todo
mccabe
# Potential flake8 plugins that should be used: # TBD
#flake8-blind-except
#flake8-commas
#flake8-docstrings
#flake8-mypy
#flake8-pep3101
#flake8-plone-hasattr
#flake8-string-format
#flake8_strict
#flake8-quotes

commands =
- isort --check-only --diff {toxinidir}/src setup.py
flake8 src setup.py

0 comments on commit 8d4a732

Please sign in to comment.