From: Zhiteng Huang Date: Tue, 24 Jun 2014 07:59:10 +0000 (+0800) Subject: Bump minimum hacking version to 0.9.2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9edb49f0fb1d3ae932f20f47445c10218fd7a262;p=openstack-build%2Fcinder-build.git Bump minimum hacking version to 0.9.2 Take advantage of newer version hacking to automate a few style checkings. A change included this hacking update was proposed by OpenStack Proposal Bot in earlier patch sets (before 19) but somehow it was missed in latter proposals. (https://review.openstack.org/#/c/96206/) Modified/New rules in 0.9.2: Rule changes: * Report E129 instead of E125 for visually indented line with same indent * as next logical line. * Report E265 for space before block comment. * Report E713 and E714 when operators ``not in`` and ``is not`` are recommended (taken from hacking). * Report E131 instead of E121 / E126 if the hanging indent is not consistent within the same continuation block. It helps when error E121 or E126 is in the ``ignore`` list. * Report E126 instead of E121 when the continuation line is hanging with extra indentation, even if indentation is not a multiple of 4. - Dropped H901,H902 as those are now in pep8 and enforced by E713 and E714 New rules: + H104 File contains nothing but comments + H305 imports not grouped correctly + H307 like imports should be grouped together + H405 multi line docstring summary not separated with an empty line + H904 Wrap long lines in parentheses instead of a backslash These rules (including changed rules) are all disabled in this change if they caues any pep8 checking failure, and will be turned on in follow-up patches if considered useful. Original commit message in openstack/requirements: Hacking 0.9.1 was out for a while (hacking 0.9.0 had a minor bug in it, so its blacklisted), and we want to start supporting projects to migrate over to 0.9.x. Expand the upper bound to allow 0.9.x while still supporting 0.8.x series so we keep the old version in our mirrors as to not break anything. Change-Id: Ifde0a550e7f9c76b0446759e9f690da2b2aafceb --- diff --git a/test-requirements.txt b/test-requirements.txt index 7a280b9b2..5f20bd479 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,5 @@ # Install bounded pep8/pyflakes first, then let flake8 install -hacking>=0.8.0,<0.9 +hacking>=0.9.2,<0.10 coverage>=3.6 discover fixtures>=0.3.14 diff --git a/tox.ini b/tox.ini index 98404315a..44931e3a3 100644 --- a/tox.ini +++ b/tox.ini @@ -47,7 +47,10 @@ commands = commands = {posargs} [flake8] -ignore = E711,E712,F403,H302,H803 +# Due to hacking 0.9.2 following checking are ignored on purpose for now +# E111,E112,E113,E121,E122,E123,E126,E128,E251,E265 +# E713,F403,F841,H302,H305,H307,H402,H405,H803,H904 +ignore = E111,E112,E113,E121,E122,E123,E126,E128,E251,E265,E711,E712,E713,F402,F841,H104,H302,H305,H307,H402,H405,H803,H904 builtins = _ exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build