11import atexit
2- from typing import Optional
2+ from typing import Optional , Any
33
44from agentops .client .api import ApiClient
55from agentops .config import Config
@@ -49,7 +49,7 @@ class Client:
4949
5050 api : ApiClient
5151
52- def __new__ (cls , * args , ** kwargs ) :
52+ def __new__ (cls , * args : Any , ** kwargs : Any ) -> "Client" :
5353 if cls .__instance is None :
5454 cls .__instance = super (Client , cls ).__new__ (cls )
5555 # Initialize instance variables that should only be set once per instance
@@ -69,7 +69,7 @@ def __init__(self):
6969 # self._init_trace_context = None # Already done in __new__
7070 # self._legacy_session_for_init_trace = None # Already done in __new__
7171
72- def init (self , ** kwargs ) -> None : # Return type updated to None
72+ def init (self , ** kwargs : Any ) -> None : # Return type updated to None
7373 # Recreate the Config object to parse environment variables at the time of initialization
7474 # This allows re-init with new env vars if needed, though true singletons usually init once.
7575 self .config = Config ()
@@ -168,7 +168,7 @@ def init(self, **kwargs) -> None: # Return type updated to None
168168 self ._initialized = True # Successfully initialized, just no auto-trace
169169 return None # No auto-session, so return None
170170
171- def configure (self , ** kwargs ) :
171+ def configure (self , ** kwargs : Any ) -> None :
172172 """Update client configuration"""
173173 self .config .configure (** kwargs )
174174
@@ -177,7 +177,7 @@ def initialized(self) -> bool:
177177 return self ._initialized
178178
179179 @initialized .setter
180- def initialized (self , value : bool ):
180+ def initialized (self , value : bool ) -> None :
181181 if self ._initialized and self ._initialized != value :
182182 # Allow re-setting to False if we are intentionally re-initializing
183183 # This logic is now partly in init() to handle re-init cases
0 commit comments