Removal of F824 (unnecessary use of nonlocal keyword) flake8 error and Revert Pin flake8 version while flake issues are being fixed (8a995a253c3ab1b31b8274794f832845d16bfb7e)

Change-Id: Ide548d6c6408863c09f31ea3a4e086f7305983bc
Signed-off-by: Anirudh Gupta <anirudh.gupta@hsc.com>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_lcm/netslice.py b/osm_lcm/netslice.py
index 8fe291b..b5e6642 100644
--- a/osm_lcm/netslice.py
+++ b/osm_lcm/netslice.py
@@ -137,7 +137,7 @@
             :param vld_id The VLD id inside nsir to be created
             :param nsir_id The nsir id
             """
-            nonlocal nsi_vld_instantiationi_params
+            # nonlocal nsi_vld_instantiationi_params
             ip_vld = None
             mgmt_network = False
             RO_vld_sites = []
@@ -297,8 +297,8 @@
                 db_nsir_update["_admin.deployed.RO"].append(db_nsir_update_RO)
 
         def overwrite_nsd_params(self, db_nsir, nslcmop):
-            nonlocal nsi_vld_instantiationi_params
-            nonlocal db_nsir_update
+            # nonlocal nsi_vld_instantiationi_params
+            # nonlocal db_nsir_update
             vld_op_list = []
             vld = None
             nsr_id = nslcmop.get("nsInstanceId")
diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py
index 4ed36cf..8906e2a 100644
--- a/osm_lcm/ns.py
+++ b/osm_lcm/ns.py
@@ -690,7 +690,7 @@
         db_vims = {}
 
         def get_vim_account(vim_account_id):
-            nonlocal db_vims
+            # nonlocal db_vims
             if vim_account_id in db_vims:
                 return db_vims[vim_account_id]
             db_vim = self.db.get_one("vim_accounts", {"_id": vim_account_id})
@@ -3778,7 +3778,7 @@
         }
 
         async def _get_cluster_id(cluster_id, cluster_type):
-            nonlocal k8scluster_id_2_uuic
+            # nonlocal k8scluster_id_2_uuic
             if cluster_id in k8scluster_id_2_uuic[cluster_type]:
                 return k8scluster_id_2_uuic[cluster_type][cluster_id]
 
@@ -8438,7 +8438,7 @@
         """
 
         def get_vim_account(vim_account_id):
-            nonlocal db_vims
+            # nonlocal db_vims
             if vim_account_id in db_vims:
                 return db_vims[vim_account_id]
             db_vim = self.db.get_one("vim_accounts", {"_id": vim_account_id})
diff --git a/tox.ini b/tox.ini
index f106d06..268ae78 100644
--- a/tox.ini
+++ b/tox.ini
@@ -55,7 +55,7 @@
 
 #######################################################################################
 [testenv:flake8]
-deps = flake8==7.1.2
+deps = flake8
 commands =
         flake8 osm_lcm/ setup.py