
    gh                         S SK Jr  S SKJr  S SKJrJr   S SKrS SKJ	r	J
r
  \(       a  S SKJr  S SKJr  S SKJr  S S	K Jr   " S S\5      r " S S\	5      rg! \ a	    \" S
5      ef = f)    )TYPE_CHECKING)add_feature_flag)DidNotEnableIntegrationN)HookMetadata)LDClient)EvaluationSeriesContext)EvaluationDetail)AnyzLaunchDarkly is not installedc                   2    \ rS rSrSrSS jr\S 5       rSrg)LaunchDarklyIntegration   launchdarklyNc                     U=(       d    [         R                  " 5       nUR                  5       (       d  [        S5      eUR                  [        5       5        g! [         a  n[        S[	        U5      -   5      eSnAff = f)z
:param client: An initialized LDClient instance. If a client is not provided, this
    integration will attempt to use the shared global instance.
z#Error getting LaunchDarkly client. Nz'LaunchDarkly client is not initialized.)ldclientget	Exceptionr   repris_initializedadd_hookLaunchDarklyHook)self	ld_clientclientexcs       g/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/integrations/launchdarkly.py__init__ LaunchDarklyIntegration.__init__   sp    	R0(,,.F $$&&HII 	(*+  	RDtCyPQQ	Rs   A 
B $A;;B c                      g N r"       r   
setup_once"LaunchDarklyIntegration.setup_once(   s     	r#   r"   r!   )	__name__
__module____qualname____firstlineno__
identifierr   staticmethodr$   __static_attributes__r"   r#   r   r   r      s     J,"  r#   r   c                   0    \ rS rSr\S 5       rS rS rSrg)r   .   c                     [        SS9$ )Nzsentry-flag-auditor)name)r   )r   s    r   metadataLaunchDarklyHook.metadata0   s     233r#   c                     [        UR                  [        5      (       a   [        UR                  UR                  5        U$ r!   )
isinstancevalueboolr   key)r   series_contextdatadetails       r   after_evaluation!LaunchDarklyHook.after_evaluation5   s,    fllD))^//>r#   c                     U$ r!   r"   )r   r8   r9   s      r   before_evaluation"LaunchDarklyHook.before_evaluation<   s    r#   r"   N)	r&   r'   r(   r)   propertyr1   r;   r>   r,   r"   r#   r   r   r   .   s    4 4r#   r   )typingr   sentry_sdk.feature_flagsr   sentry_sdk.integrationsr   r   r   ldclient.hookr   r   r	   r
   ldclient.evaluationr   r   ImportErrorr   r   r"   r#   r   <module>rG      s]      5 =8,%98
k 4t =  8
6
778s   +A A'