From 82af97587922b531253cf03d6fabd9d07720381b Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 2 Sep 2017 14:15:24 -0500 Subject: [PATCH] Update tox/test-requirements In working on a different patch it became clear that flake8 wasn't actually running such that it found errors. Updated the test-requirements to match what's in zuul and all started working (and failing) properly. Change-Id: Icfdb1fedbd92ff49484b116a0879686581274a25 --- roles/upload-afs/library/zuul_afs.py | 5 ++++- test-requirements.txt | 5 +++-- tox.ini | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/roles/upload-afs/library/zuul_afs.py b/roles/upload-afs/library/zuul_afs.py index d92fc21b0..56f1e14b1 100644 --- a/roles/upload-afs/library/zuul_afs.py +++ b/roles/upload-afs/library/zuul_afs.py @@ -14,11 +14,15 @@ # # You should have received a copy of the GNU General Public License # along with this software. If not, see . +from __future__ import absolute_import, division, print_function +__metaclass__ = type import os import subprocess import tempfile +from ansible.module_utils.basic import AnsibleModule + def afs_sync(afssource, afstarget): # Find the list of root markers in the just-completed build @@ -106,7 +110,6 @@ def main(): output = afs_sync(p['source'], p['target']) module.exit_json(changed=True, build_roots=output) -from ansible.module_utils.basic import * # noqa if __name__ == '__main__': main() diff --git a/test-requirements.txt b/test-requirements.txt index 955648be4..a68ae01e5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,9 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr>=1.1.0 -hacking>=0.12.0,<0.13 # Apache-2.0 +pep8 +pyflakes +flake8 ansible-lint bashate>=0.2 diff --git a/tox.ini b/tox.ini index ab9216da5..00c32103f 100644 --- a/tox.ini +++ b/tox.ini @@ -43,6 +43,7 @@ commands = {posargs} [flake8] # These are ignored intentionally in openstack-infra projects; # please don't submit patches that solely correct them or enable them. -ignore = E125,E129,H +# E402 - ansible modules put documentation before imports. Align to ansible. +ignore = E125,E129,E402,H show-source = True exclude = .venv,.tox,dist,doc,build,*.egg