mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 01:18:39 +00:00
[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
3 changed files with 8 additions and 19 deletions
|
@ -25,7 +25,6 @@ env:
|
||||||
- TOX_ENV=pydef
|
- TOX_ENV=pydef
|
||||||
- TOX_ENV=flake8
|
- TOX_ENV=flake8
|
||||||
# - TOX_ENV=flake8-complexity
|
# - TOX_ENV=flake8-complexity
|
||||||
- TOX_ENV=isort
|
|
||||||
- TOX_ENV=docs
|
- TOX_ENV=docs
|
||||||
# - TOX_ENV=todo
|
# - TOX_ENV=todo
|
||||||
- TOX_ENV=trial APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
|
- TOX_ENV=trial APTPACKAGES="$APTPACKAGES $APTPACKAGES_GTKUI"
|
||||||
|
|
|
@ -16,8 +16,11 @@ frameworks = CoreFoundation, Foundation, AppKit
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
known_standard_library = future_builtins
|
known_standard_library = future_builtins
|
||||||
# Ignore Windows specific modules
|
known_third_party =
|
||||||
known_third_party = bbfreeze, win32verstamp
|
# 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
|
known_first_party = msgfmt, deluge
|
||||||
order_by_type = true
|
order_by_type = true
|
||||||
line_length = 120
|
line_length = 120
|
||||||
|
|
19
tox.ini
19
tox.ini
|
@ -13,7 +13,7 @@ max-line-length = 120
|
||||||
ignore = E301,E309
|
ignore = E301,E309
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py27, flake8, isort, docs, pylint
|
envlist = py27, flake8, docs, pylint
|
||||||
minversion=1.8
|
minversion=1.8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -88,21 +88,6 @@ commands = {[testenv:pydef]commands}
|
||||||
# Code style verification
|
# 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]
|
[testenv:flake8]
|
||||||
# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
|
# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
|
||||||
sitepackages = False
|
sitepackages = False
|
||||||
|
@ -110,9 +95,11 @@ deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
flake8
|
flake8
|
||||||
flake8-quotes
|
flake8-quotes
|
||||||
|
flake8-isort
|
||||||
pep8-naming
|
pep8-naming
|
||||||
commands =
|
commands =
|
||||||
flake8 --version
|
flake8 --version
|
||||||
|
python -c 'import isort; print(isort.__version__)'
|
||||||
flake8
|
flake8
|
||||||
|
|
||||||
[testenv:flake8-complexity]
|
[testenv:flake8-complexity]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue