Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Dan Kenigsberg has submitted this change and it was merged. Change subject: build: Replace pep8 and pyflakes with flake8 .. build: Replace pep8 and pyflakes with flake8 flake8 is an extensible and configurable tool combining pep8, pyflakes and other plugins. This patch replace the pep8 and pyflakes targets with single flake8 target, and remove the complex and ugly tox.sh. Everyting is configured in a simple way in tox.ini. Since this version includes the newers versions of pyflakes and pep8, we are ignoring some new errors and warnings. See tox.ini for the details. To disable ignored warnings and errors, you can: tox -- --ignore='' I enabled the --show-source option by default, so now we see exactly where is the error: ./tests/functional/networkTests.py:465:29: W503 line break before binary operator <= (ARP_REQUEST_SIZE + DHCP_PACKET_SIZE), I also enabled the --statistics option, showing: 26E123 closing bracket does not match indentation of opening bracket's line 32E226 missing whitespace around arithmetic operator 45E241 multiple spaces after ',' 31E402 module level import not at top of file 25E731 do not assign a lambda expression, use a def 24W503 line break before binary operator For more info see http://flake8.pycqa.org Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Signed-off-by: Nir SofferReviewed-on: https://gerrit.ovirt.org/65403 Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani Reviewed-by: Edward Haas Reviewed-by: Piotr Kliczewski Reviewed-by: Dan Kenigsberg --- M Makefile.am M contrib/shell_helper M tox.ini D tox.sh 4 files changed, 38 insertions(+), 65 deletions(-) Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Looks good to me, but someone else must approve Edward Haas: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
gerrit-hooks has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 3: * Update Tracker::IGNORE, no bug url/s found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Dan Kenigsberg has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Piotr Kliczewski has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 Ah, I got confused between py3 (only) code and py2 code compatible with py3. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Francesco Romani has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 good idea, I like this. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: What do you mean it is not relevant? We need it installed once for py2 and once for py3 so tests will pass, no? Does tox take care of that somehow? -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Nir Soffer has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Edward, flake8 works on both python 2 and 3, but this is not relevant to our tests. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: -Code-Review Will this work with py3? -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
gerrit-hooks has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Nir Soffer has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 1: Verified+1 Tested locally. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
gerrit-hooks has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Nir Soffer has uploaded a new change for review. Change subject: build: Replace pep8 and pyflakes with flake8 .. build: Replace pep8 and pyflakes with flake8 flake8 is an extensible and configurable tool combining pep8, pyflakes and other plugins. This patch replace the pep8 and pyflakes targets with single flake8 target, and remove the complex and ugly tox.sh. Everyting is configured in a simple way in tox.ini. Since this version includes the newers versions of pyflakes and pep8, we are ignoring some new errors and warnings. See tox.ini for the details. To disable ignored warnings and errors, you can: tox -- --ignore='' I enabled the --show-source option by default, so now we see exactly where is the error: ./tests/functional/networkTests.py:465:29: W503 line break before binary operator <= (ARP_REQUEST_SIZE + DHCP_PACKET_SIZE), I also enabled the --statistics option, showing: 26E123 closing bracket does not match indentation of opening bracket's line 32E226 missing whitespace around arithmetic operator 45E241 multiple spaces after ',' 31E402 module level import not at top of file 25E731 do not assign a lambda expression, use a def 24W503 line break before binary operator For more info see http://flake8.pycqa.org Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Signed-off-by: Nir Soffer--- M Makefile.am M contrib/shell_helper M tox.ini D tox.sh 4 files changed, 38 insertions(+), 65 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/65403/1 diff --git a/Makefile.am b/Makefile.am index 789221c..354c6b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,7 +58,6 @@ vdsm.spec \ vdsm.spec.in \ tox.ini \ - tox.sh \ $(NULL) CLEANFILES = \ @@ -88,19 +87,9 @@ echo "Missing absolute_import in $$f"; exit 1; fi; \ done; -PYTHON_CHECKERS = pyflakes pep8 - -.PHONY: py_checkers -py_checkers: - tox -- $(PYTHON_CHECKERS) - -.PHONY: pyflakes -pyflakes: tox - tox -- pyflakes - -.PHONY: pep8 -pep8: tox - tox -- pep8 +.PHONY: flake8 +flake8: tox + tox -e flake8 .PHONY: tox tox: @@ -127,7 +116,7 @@ fi # Note: dependencies ordered by time needed to run them -check: gitignore abs_imports python3 py_checkers tests +check: gitignore abs_imports python3 flake8 tests check-recursive: @true diff --git a/contrib/shell_helper b/contrib/shell_helper index 77f8422..2d4dc65 100755 --- a/contrib/shell_helper +++ b/contrib/shell_helper @@ -199,9 +199,9 @@ del_net_persistency } -vdsm_pep8() { +vdsm_flake8() { pushd $VDSM_DIR -./autogen.sh --system && ./configure && make pep8 +./autogen.sh --system && ./configure && make flake8 popd } diff --git a/tox.ini b/tox.ini index d567ec1..8686eb2 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,37 @@ [tox] -envlist = py27 +envlist = flake8 skipsdist = true -[testenv:py27] +[testenv:flake8] deps = -pyflakes==1.0.0 -pep8==1.5.7 +flake8 commands= -{toxinidir}/tox.sh {posargs} +flake8 --statistics {posargs} \ +. \ +build-aux/vercmp \ +contrib/logdb \ +contrib/logstat \ +contrib/profile-stats \ +init/daemonAdapter \ +vdsm-tool/vdsm-tool \ +vdsm/get-conf-item \ +vdsm/set-conf-item \ +vdsm/storage/curl-img-wrap \ +vdsm/storage/fc-scan \ +vdsm/supervdsmServer \ +vdsm/vdsm \ +vdsm/vdsm-restore-net-config + +[flake8] + +# Ignore errors in current code to make the build pass +# 26E123 closing bracket does not match indentation of opening bracket's line +# 32E226 missing whitespace around arithmetic operator +# 45E241 multiple spaces after ',' +# 31E402 module level import not at top of file +# 25E731 do not assign a lambda expression, use a def +# 24W503 line break before binary operator +# TODO: fix the code and eliminate these ignores +ignore = E123, E226, E241, E402, E731, W503 + +show_source = True diff --git a/tox.sh b/tox.sh deleted file mode 100755 index f85c013..000 --- a/tox.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e - -WHITELIST=(build-aux/vercmp \ - contrib/logdb \ - contrib/logstat \ - contrib/profile-stats \ - init/daemonAdapter \ - vdsm/get-conf-item \ - vdsm/set-conf-item \ - vdsm/supervdsmServer \ - vdsm/vdsm \ - vdsm/vdsm-restore-net-config \ - vdsm/storage/curl-img-wrap \ - vdsm/storage/fc-scan \ - vdsm-tool/vdsm-tool - ) - -SKIP_PYFLAKES_ERR="\./vdsm/storage/lvm\.py.*: list comprehension redefines \ - 'lv' from line .*" - -PEP8_BLACKLIST=(config.py \ -constants.py \ -crossImportsTests.py \ -