Skip to content

Commit

Permalink
Update configuration for version 5 of isort
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
jugmac00 committed Jul 16, 2020
1 parent 82f85a6 commit 3527979
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -4,6 +4,8 @@ Changelog
5.5 (unreleased)
----------------

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


5.4 (2020-02-06)
----------------
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Expand Up @@ -14,8 +14,6 @@ known_third_party = six
default_section = ZOPE
line_length = 79
lines_after_imports = 2
not_skip =
__init__.py

[flake8]
ignore =
Expand Down
3 changes: 2 additions & 1 deletion src/Products/SiteErrorLog/SiteErrorLog.py
Expand Up @@ -28,13 +28,14 @@
from Acquisition import aq_base
from App.Dialogs import MessageDialog
from OFS.SimpleItem import SimpleItem
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from transaction.interfaces import TransientError
from zExceptions.ExceptionFormatter import format_exception
from zope.component import adapter
from zope.event import notify
from ZPublisher.interfaces import IPubFailure

from Products.PageTemplates.PageTemplateFile import PageTemplateFile

from .interfaces import ErrorRaisedEvent


Expand Down
3 changes: 2 additions & 1 deletion src/Products/SiteErrorLog/tests/testInitialization.py
Expand Up @@ -17,13 +17,14 @@
import tempfile
import unittest

import Products
from App.config import getConfiguration
from App.config import setConfiguration
from OFS.Application import AppInitializer
from OFS.Application import Application
from Zope2.Startup.options import ZopeWSGIOptions

import Products


test_cfg = """
instancehome {instance_home}
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Expand Up @@ -39,7 +39,7 @@ 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 +52,6 @@ deps =
flake8-debugger
flake8-deprecated
flake8-todo
flake8-isort
mccabe
flake8-blind-except
flake8-commas
Expand Down

0 comments on commit 3527979

Please sign in to comment.