[Tests] Replace isort test with flake8-isort
* Move the known_third_party back to setup.cfg with comments.
This commit is contained in:
parent
7ebd69218f
commit
874249655d
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
19
tox.ini
19
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]
|
||||
|
|
Loading…
Reference in New Issue