From 44e2011051a23dfa08a7df4f813073d026258f75 Mon Sep 17 00:00:00 2001 From: jacky06 Date: Wed, 6 May 2020 13:32:02 +0800 Subject: [PATCH] Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I6a4340d71e934cad5d9c2337e4728c6900fdd924 --- test-requirements.txt | 2 +- tools/install_venv.py | 1 + tox.ini | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index 161ebe0..4626f68 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ # be installed in a specific order. # # Hacking should appear first in case something else depends on pep8 -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 mock>=2.0.0 # BSD diff --git a/tools/install_venv.py b/tools/install_venv.py index ae4ecfe..f423d89 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -67,5 +67,6 @@ def main(argv): install.install_dependencies() print_help(venv, root) + if __name__ == '__main__': main(sys.argv) diff --git a/tox.ini b/tox.ini index 97de0fb..88526ac 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,8 @@ commands = flake8 {posargs} [flake8] # F405 TEMPLATES may be undefined, or defined from star imports # (because it is not easy to avoid this in openstack_dashboard.test.settings) -ignore = F405 +# W504 line break after binary operator +ignore = F405,W504 exclude = .venv,.git,.tox,dist,*egg,build,node_modules max-complexity = 20