
    lhk                         d dl mZmZ d dlmZ d dlmZmZ 	 d dlm	Z	 d dl
mZ erd dl
mZmZ  G d d	e      Z G d
 de      Zy# e$ r	  ed      w xY w)    )TYPE_CHECKINGAny)add_feature_flag)DidNotEnableIntegration)api)Hook)HookContext	HookHintszOpenFeature is not installedc                        e Zd ZdZed        Zy)OpenFeatureIntegrationopenfeaturec                  B    t        j                  t               g       y )N)hooks)r   	add_hooksOpenFeatureHook     u/var/www/pru.catia.catastroantioquia-mas.com/tasa/lib/python3.12/site-packages/sentry_sdk/integrations/openfeature.py
setup_oncez!OpenFeatureIntegration.setup_once   s     	_./0r   N)__name__
__module____qualname__
identifierstaticmethodr   r   r   r   r   r      s    J1 1r   r   c                       e Zd Zd Zd Zy)r   c                 z    t        |j                  t              r!t        |j                  |j                         y y N)
isinstancevalueboolr   flag_key)selfhook_contextdetailshintss       r   afterzOpenFeatureHook.after   s)    gmmT*W--w}}= +r   c                 z    t        |j                  t              r!t        |j                  |j                         y y r   )r   default_valuer!   r   r"   )r#   r$   	exceptionr&   s       r   errorzOpenFeatureHook.error    s-    l00$7\22L4N4NO 8r   N)r   r   r   r'   r+   r   r   r   r   r      s    >
Pr   r   N)typingr   r   sentry_sdk.feature_flagsr   sentry_sdk.integrationsr   r   r   r   openfeature.hookr	   r
   r   ImportErrorr   r   r   r   r   <module>r1      sV    % 5 =7%;
1[ 1	Pd 	P  7
5
667s   A A