XZise has uploaded a new change for review.
https://gerrit.wikimedia.org/r/236547
Change subject: [IMPROV] tox: Remove duplication
......................................................................
[IMPROV] tox: Remove duplication
Instead of having the error codes copied from everywhere just define the error
codes for flake8 once and reuse them for the different tests.
Change-Id: Ia612a8632b69978163df39a13afdcd018996f05a
---
M tox.ini
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/47/236547/1
diff --git a/tox.ini b/tox.ini
index 7449e16..efeea0b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,6 +5,7 @@
[params]
nose_skip = --ignore-files=(gui\.py|botirc\.py|rcstream\.py)
+flake8_ignore = D102,D103,E122,E127,{[flake8]ignore}
[testenv]
setenv =
@@ -18,14 +19,14 @@
deps = unittest2
[testenv:flake8]
-commands = flake8 --ignore=D102,D103,E122,E127,E241,E402,E731 {posargs}
+commands = flake8 --ignore={[params]flake8_ignore} {posargs}
basepython = python2.7
deps = flake8
flake8-docstrings
flake8-coding
[testenv:flake8-py3]
-commands = flake8 --ignore=D102,D103,E122,E127,E241,E402,E731 {posargs}
+commands = flake8 --ignore={[params]flake8_ignore} {posargs}
basepython = python3
deps = flake8
flake8-docstrings
@@ -222,7 +223,7 @@
commands = {posargs}
[flake8]
-ignore = E241,E265,E402,E731
+ignore = E241,E402,E731
exclude =
.tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*
max_line_length = 130
accept-encodings = utf-8
--
To view, visit https://gerrit.wikimedia.org/r/236547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia612a8632b69978163df39a13afdcd018996f05a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits