Removal of F824 (unnecessary use of nonlocal keyword) flake8 error and Revert Pin... 98/15198/1
authorAnirudh Gupta <anirudh.gupta@hsc.com>
Tue, 13 May 2025 05:53:38 +0000 (05:53 +0000)
committerAnirudh Gupta <anirudh.gupta@hsc.com>
Tue, 13 May 2025 05:53:38 +0000 (05:53 +0000)
Change-Id: Ide548d6c6408863c09f31ea3a4e086f7305983bc
Signed-off-by: Anirudh Gupta <anirudh.gupta@hsc.com>
osm_lcm/netslice.py
osm_lcm/ns.py
tox.ini

index 8fe291b..b5e6642 100644 (file)
@@ -137,7 +137,7 @@ class NetsliceLcm(LcmBase):
             :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 @@ class NetsliceLcm(LcmBase):
                 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")
index 4ed36cf..8906e2a 100644 (file)
@@ -690,7 +690,7 @@ class NsLcm(LcmBase):
         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 @@ class NsLcm(LcmBase):
         }
 
         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 @@ class NsLcm(LcmBase):
         """
 
         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 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -55,7 +55,7 @@ allowlist_externals = sh
 
 #######################################################################################
 [testenv:flake8]
-deps = flake8==7.1.2
+deps = flake8
 commands =
         flake8 osm_lcm/ setup.py