From 771dcae2eddd7003159846994b1196b709de8602 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Fri, 15 May 2020 14:09:25 +0000 Subject: [PATCH] Switch to hacking 3.0 This patch update hacking version to 3.0.0[1]. In order to make code compatible with new hacking rules line break before/after binary operator I have added W504 into ignore list in tox.ini. It also drop flake8, hacking, django-babel, and mox3 packages from lower-requirements.txt. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html Change-Id: I96fc5ca23010958d68cf261793489580b57f3a4f --- lower-constraints.txt | 4 ---- octavia_dashboard/api/rest/lbaasv2.py | 2 +- test-requirements.txt | 2 +- tox.ini | 3 ++- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 39cbe8b4..e232bddc 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -14,7 +14,6 @@ decorator==3.4.0 deprecation==1.0 Django==2.2 django-appconf==1.0.2 -django-babel==0.5.1 django-compressor==2.0 django-pyscss==2.0.2 dogpile.cache==0.6.2 @@ -22,10 +21,8 @@ eventlet==0.18.2 extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 -flake8==2.5.5 futurist==1.2.0 greenlet==0.4.10 -hacking==0.12.0 horizon==17.1.0 idna==2.6 iso8601==0.1.11 @@ -41,7 +38,6 @@ MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 monotonic==0.6 -mox3==0.20.0 msgpack-python==0.4.0 munch==2.1.0 netaddr==0.7.18 diff --git a/octavia_dashboard/api/rest/lbaasv2.py b/octavia_dashboard/api/rest/lbaasv2.py index c4444a01..fa1d04cd 100644 --- a/octavia_dashboard/api/rest/lbaasv2.py +++ b/octavia_dashboard/api/rest/lbaasv2.py @@ -1039,7 +1039,7 @@ class Pools(generic.View): filtered_pools.append(pool) elif (pool['listeners'] and pool['listeners'][0]['id'] == listener_id): - filtered_pools.append(pool) + filtered_pools.append(pool) return filtered_pools diff --git a/test-requirements.txt b/test-requirements.txt index 123e9ee5..80bcf625 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0.1,<3.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 selenium>=2.50.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 80b5b04c..394dd348 100644 --- a/tox.ini +++ b/tox.ini @@ -80,9 +80,10 @@ commands = npm install [flake8] # E123, E125 skipped as they are invalid PEP-8. # F405 TEMPLATES may be undefined, or defined from star imports +# W504 line break after binary operator # (because it is not easy to avoid this in openstack_dashboard.test.settings) show-source = True -ignore = E123,E125,F405 +ignore = E123,E125,F405,W504 builtins = _ exclude=.venv,.git,.tox,.tmp,dist,doc,*lib/python*,*egg,build,node_modules