@@ -415,9 +415,9 @@ class TelemetryClientFactory:
415415 It uses a thread pool to handle asynchronous operations and a single flush thread for all clients.
416416 """
417417
418- _clients : Dict [str , BaseTelemetryClient ] = (
419- {}
420- ) # Map of session_id_hex -> BaseTelemetryClient
418+ _clients : Dict [
419+ str , BaseTelemetryClient
420+ ] = {} # Map of session_id_hex -> BaseTelemetryClient
421421 _executor : Optional [ThreadPoolExecutor ] = None
422422 _initialized : bool = False
423423 _lock = threading .RLock () # Thread safety for factory operations
@@ -518,21 +518,21 @@ def initialize_telemetry_client(
518518 session_id_hex ,
519519 )
520520 if telemetry_enabled :
521- TelemetryClientFactory ._clients [session_id_hex ] = (
522- TelemetryClient (
523- telemetry_enabled = telemetry_enabled ,
524- session_id_hex = session_id_hex ,
525- auth_provider = auth_provider ,
526- host_url = host_url ,
527- executor = TelemetryClientFactory . _executor ,
528- batch_size = batch_size ,
529- client_context = client_context ,
530- )
521+ TelemetryClientFactory ._clients [
522+ session_id_hex
523+ ] = TelemetryClient (
524+ telemetry_enabled = telemetry_enabled ,
525+ session_id_hex = session_id_hex ,
526+ auth_provider = auth_provider ,
527+ host_url = host_url ,
528+ executor = TelemetryClientFactory . _executor ,
529+ batch_size = batch_size ,
530+ client_context = client_context ,
531531 )
532532 else :
533- TelemetryClientFactory ._clients [session_id_hex ] = (
534- NoopTelemetryClient ()
535- )
533+ TelemetryClientFactory ._clients [
534+ session_id_hex
535+ ] = NoopTelemetryClient ( )
536536 except Exception as e :
537537 logger .debug ("Failed to initialize telemetry client: %s" , e )
538538 # Fallback to NoopTelemetryClient to ensure connection doesn't fail
0 commit comments