Skip to content

Commit

Permalink
Update configuration for version 5 of isort (#24)
Browse files Browse the repository at this point in the history
* Update configuration for version 5 of `isort`

- remove deprecated configuration options
- remove duplicate isort check via flake8
- fix sort order of imports

modified:   CHANGES.rst
modified:   setup.cfg
modified:   src/Products/SiteErrorLog/SiteErrorLog.py
modified:   src/Products/SiteErrorLog/tests/testInitialization.py
modified:   tox.ini

* - clean up tox config and enable parallel runs with ``-pall``

* - fix imports by designating packages as belonging to the default Zope section

* - fix Travis config

Co-authored-by: Jens Vagelpohl <jens@netz.ooo>
  • Loading branch information
jugmac00 and dataflake committed Jul 16, 2020
1 parent 82f85a6 commit 1f3fa3d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 24 deletions.
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ language: python
matrix:
include:
- python: "3.6"
env: TOXENV=flake8
env: TOXENV=lint
after_success:
- python: "2.7"
env: TOXENV=py27
- python: "3.5"
Expand All @@ -12,10 +13,8 @@ matrix:
env: TOXENV=py36
- python: "3.7"
env: TOXENV=py37
dist: xenial
- python: "3.8"
env: TOXENV=py38
dist: xenial

install:
- travis_retry pip install -U pip setuptools
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
5.5 (unreleased)
----------------

- Update configuration for version 5 of ``isort``


5.4 (2020-02-06)
----------------
Expand Down
5 changes: 0 additions & 5 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ extends =
develop = .
parts =
test
tox

[test]
recipe = zc.recipe.testrunner
eggs = Products.SiteErrorLog

[tox]
recipe = zc.recipe.egg
eggs = tox
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ force_single_line = True
combine_as_imports = True
sections = FUTURE,STDLIB,THIRDPARTY,ZOPE,FIRSTPARTY,LOCALFOLDER
known_third_party = six
known_zope = Products, Products.PageTemplates
default_section = ZOPE
line_length = 79
lines_after_imports = 2
not_skip =
__init__.py

[flake8]
ignore =
Expand All @@ -29,7 +28,7 @@ exclude =

[coverage:run]
branch = True
source = src
source = Products.SiteErrorLog
omit =

[coverage:report]
Expand Down
18 changes: 11 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ envlist =
py36,
py37,
py38,
flake8,
lint,
coverage-report,

[testenv]
skip_install = true
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} buildout:sources-dir={toxinidir}/develop install test
coverage run {envbindir}/test --all {posargs:-vc}
deps =
Expand All @@ -24,22 +23,28 @@ setenv =
[testenv:coverage-report]
basepython = python3.6
deps = coverage
depends =
py27,
py35,
py36,
py37,
py38
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html -i --rcfile={toxinidir}/setup.cfg
coverage html -i
coverage xml -i
coverage report -i --rcfile={toxinidir}/setup.cfg
coverage report -i

[testenv:flake8]
[testenv:lint]
basepython = python3.6
commands_pre =
mkdir -p {toxinidir}/parts/flake8
commands =
isort --check-only --diff --recursive {toxinidir}/src setup.py
isort --check-only --diff {toxinidir}/src setup.py
- flake8 --format=html src setup.py
flake8 src setup.py
deps =
Expand All @@ -52,7 +57,6 @@ deps =
flake8-debugger
flake8-deprecated
flake8-todo
flake8-isort
mccabe
flake8-blind-except
flake8-commas
Expand Down

0 comments on commit 1f3fa3d

Please sign in to comment.