Add type hint for NsDbActivity 56/13256/1
authorDaniel Arndt <daniel.arndt@canonical.com>
Fri, 21 Apr 2023 12:32:04 +0000 (09:32 -0300)
committerDaniel Arndt <daniel.arndt@canonical.com>
Fri, 21 Apr 2023 12:32:04 +0000 (09:32 -0300)
Change-Id: I1c9bb675d7eab2706afa23af75557896caa73396
Signed-off-by: Daniel Arndt <daniel.arndt@canonical.com>
osm_lcm/temporal/ns_activities.py

index 2e08f91..c48628a 100644 (file)
@@ -28,6 +28,8 @@ from osm_common.temporal_constants import (
 )
 from temporalio import activity
 
+from osm_lcm.data_utils.database.database import Database
+
 
 class NsOperations:
     def __init__(self, db):
@@ -50,8 +52,8 @@ class NsDbActivity:
         db  (object):       Data Access Object
     """
 
-    def __init__(self, db):
-        self.db = db
+    def __init__(self, db: Database):
+        self.db: Database = db
         self.logger = logging.getLogger(f"lcm.act.{self.__class__.__name__}")
 
     @activity.defn(name=ACTIVITY_UPDATE_NS_STATE)