66import logging
77import threading
88import time
9- from typing import Callable , Union
9+ from typing import Callable , Union , List
1010
1111from c8y_api .app import MultiTenantCumulocityApp
1212
@@ -29,7 +29,7 @@ class SubscriptionListener:
2929 def __init__ (
3030 self ,
3131 app : MultiTenantCumulocityApp ,
32- callback : Callable [[list [str ]], None ] = None ,
32+ callback : Callable [[List [str ]], None ] = None ,
3333 max_threads : int = 5 ,
3434 blocking : bool = True ,
3535 polling_interval : float = 3600 ,
@@ -75,9 +75,9 @@ def _cleanup_future(self, future):
7575
7676 def add_callback (
7777 self ,
78- callback : Callable [[Union [str , list [str ]]], None ],
78+ callback : Callable [[Union [str , List [str ]]], None ],
7979 blocking : bool = True ,
80- when : str = 'any' ,
80+ when : str = 'any'
8181 ) -> "SubscriptionListener" :
8282 """Add a callback function to be invoked if a tenant subscribes
8383 to/unsubscribes from the monitored multi-tenant microservice.
@@ -262,7 +262,7 @@ def shutdown(self, timeout: float = None):
262262 self ._executor and self .get_callbacks ()):
263263 raise TimeoutError (f"Listener thread did not close within the specified timeout ({ timeout } s)." )
264264
265- def get_callbacks (self ) -> list [Future ]:
265+ def get_callbacks (self ) -> List [Future ]:
266266 """Get currently running callbacks.
267267
268268 This function can be used to gain direct access to the currently
0 commit comments