From b68276c75d1ec7b6abcf8f7b31448ece968c1c73 Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Fri, 15 May 2020 15:05:21 +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 E305, E117 pep8 errors are fixed in code. It also drop flake8, hacking, django-babel, mox3, six packages from lower-requirements.txt [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html Change-Id: I86bc2faed43e7df38682e23866ad4a4303e82667 --- lower-constraints.txt | 5 ----- .../openstack_dashboard/dashboards/nfv/dashboard.py | 1 + .../openstack_dashboard/dashboards/nfv/nsmanager/tables.py | 4 ++-- .../openstack_dashboard/dashboards/nfv/vnfmanager/tables.py | 4 ++-- test-requirements.txt | 3 +-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 260b21b..f678521 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -16,7 +16,6 @@ decorator==4.2.1 deprecation==2.0 Django==2.2 django-appconf==1.0.2 -django-babel==0.6.2 django-compressor==2.0 django-debreach==1.4.2 django-pyscss==2.0.2 @@ -26,9 +25,7 @@ dulwich==0.15.0 extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 -flake8==2.5.5 futurist==1.2.0 -hacking==0.12.0 horizon==17.1.0 idna==2.6 imagesize==0.7.1 @@ -42,7 +39,6 @@ keystoneauth1==3.6.2 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 monotonic==1.4 msgpack==0.5.6 msgpack-python==0.4.0 @@ -95,7 +91,6 @@ requestsexceptions==1.4.0 rfc3986==1.1.0 semantic-version==2.3.1 simplejson==3.13.2 -six==1.11.0 snowballstemmer==1.2.1 Sphinx==1.6.5 sphinxcontrib-websupport==1.0.1 diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/dashboard.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/dashboard.py index 93c7a6e..f122438 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/dashboard.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/dashboard.py @@ -38,4 +38,5 @@ class Nfv(horizon.Dashboard): default_panel = 'vnfcatalog' # Specify the slug of the dashboard's # default panel. + horizon.register(Nfv) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py index 24cd4bd..a3a9afa 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/nsmanager/tables.py @@ -66,8 +66,8 @@ class NSUpdateRow(tables.Row): try: # stack = api.heat.stack_get(request, stack_id) # if stack.stack_status == 'DELETE_COMPLETE': - # returning 404 to the ajax call removes the - # row from the table on the ui + # returning 404 to the ajax call removes the + # row from the table on the ui # raise Http404 item = NSManagerItemList.get_obj_given_stack_ids(ns_id) ns_instance = api.tacker.get_ns(request, ns_id) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py index 1d9e892..0489789 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/tables.py @@ -95,8 +95,8 @@ class VNFUpdateRow(tables.Row): try: # stack = api.heat.stack_get(request, stack_id) # if stack.stack_status == 'DELETE_COMPLETE': - # returning 404 to the ajax call removes the - # row from the table on the ui + # returning 404 to the ajax call removes the + # row from the table on the ui # raise Http404 item = VNFManagerItemList.get_obj_given_stack_id(vnf_id) vnf_instance = api.tacker.get_vnf(request, vnf_id) diff --git a/test-requirements.txt b/test-requirements.txt index ed4d58e..c4b9109 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,10 +7,9 @@ # 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.1,<3.1.0 # Apache-2.0 # coverage!=4.4,>=4.0 # Apache-2.0 -mock>=2.0.0 # BSD nodeenv>=0.9.4 # BSD # This also needs xvfb library installed on your OS xvfbwrapper>=0.1.3 #license: MIT