From 4f8b5ea08bdaa0ad645005ac2acc50d788a50d5a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 29 Mar 2020 15:41:46 +0200 Subject: [PATCH] Update hacking for Python3 The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Update local hacking checks for new flake8. Remove hacking and friends from lower-constraints, they are not needed for installation. Change-Id: Ib6f30427e736ff488598e80e87ce0a8b39e92f33 --- lower-constraints.txt | 5 ----- test-requirements.txt | 2 +- tox.ini | 8 ++++---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 92ef38c..518eb79 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -26,11 +26,8 @@ eventlet==0.18.2 extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 -flake8==2.5.5 -flake8-import-order==0.12 futurist==1.2.0 greenlet==0.4.10 -hacking==1.1.0 horizon==18.3.1 idna==2.6 iso8601==0.1.11 @@ -69,7 +66,6 @@ osprofiler==2.3.0 Paste==2.0.2 PasteDeploy==1.5.0 pbr==2.0.0 -pep8==1.5.7 pika==0.10.0 pika-pool==0.1.3 Pint==0.5 @@ -77,7 +73,6 @@ positional==1.2.1 prettytable==0.7.2 pycodestyle==2.3.1 pycparser==2.18 -pyflakes==0.8.1 pyinotify==0.9.6 pymongo==3.0.2 pyOpenSSL==17.1.0 diff --git a/test-requirements.txt b/test-requirements.txt index 20fbe93..89058eb 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 doc8>=0.6.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 943de4d..9e18140 100644 --- a/tox.ini +++ b/tox.ini @@ -64,10 +64,6 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/ -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html -# Temporary disabled to pass the pep8 job -# [hacking] -# local-check-factory = horizon.hacking.checks.factory - [flake8] exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules,.tmp # F405 TEMPLATES may be undefined, or defined from star imports @@ -79,6 +75,10 @@ ignore = F405,W504 max-complexity = 20 import-order-style = pep8 +[flake8:local-plugins] +extension = + M322 = horizon.hacking.checks:no_mutable_default_args + [testenv:npm] passenv = HOME