diff --git a/.travis.yml b/.travis.yml index 505d18fd5..d4816a2c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ env: - TOX_ENV=pydef - TOX_ENV=flake8 # - TOX_ENV=flake8-complexity - - TOX_ENV=isort - TOX_ENV=docs # - TOX_ENV=todo - TOX_ENV=trial APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI" diff --git a/setup.cfg b/setup.cfg index 46d52025e..b7924ac3d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,11 @@ frameworks = CoreFoundation, Foundation, AppKit [isort] known_standard_library = future_builtins -# Ignore Windows specific modules -known_third_party = bbfreeze, win32verstamp +known_third_party = +# Ignore Windows specific modules. + bbfreeze, win32verstamp, +# Ignore gtk modules, primarily for tox testing. + pygtk, gtk, gobject, gtk.gdk, pango, cairo, pangocairo known_first_party = msgfmt, deluge order_by_type = true line_length = 120 diff --git a/tox.ini b/tox.ini index 8492a4962..6972cda84 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ max-line-length = 120 ignore = E301,E309 [tox] -envlist = py27, flake8, isort, docs, pylint +envlist = py27, flake8, docs, pylint minversion=1.8 [testenv] @@ -88,21 +88,6 @@ commands = {[testenv:pydef]commands} # Code style verification ########################### -[testenv:isort] -deps = - {[testenv]deps} - isort>=4.2.5 -whitelist_externals = - {[testenv]whitelist_externals} - isort -commands = - isort --version - python -c "import subprocess, sys; output = subprocess.check_output(\ - 'isort -q --diff --recursive deluge docs packaging *.py\ - -o pygtk -o gtk -o gobject -o gtk.gdk -o pango -o cairo -o pangocairo\ - ', shell=True);\ - print output; sys.exit(bool(output))" - [testenv:flake8] # Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries. sitepackages = False @@ -110,9 +95,11 @@ deps = {[testenv]deps} flake8 flake8-quotes + flake8-isort pep8-naming commands = flake8 --version + python -c 'import isort; print(isort.__version__)' flake8 [testenv:flake8-complexity]