
    tniN                         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 n# e$ r  ed          w xY w G d d	e          Z G d
 de          ZdS )    )TYPE_CHECKINGAny)add_feature_flag)DidNotEnableIntegration)api)Hook)HookContext	HookHintszOpenFeature is not installedc                   *    e Zd ZdZedd            ZdS )OpenFeatureIntegrationopenfeaturereturnNc                  J    t          j        t                      g           d S )N)hooks)r   	add_hooksOpenFeatureHook     `/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/sentry_sdk/integrations/openfeature.py
setup_oncez!OpenFeatureIntegration.setup_once   s&     	_../000000r   )r   N)__name__
__module____qualname__
identifierstaticmethodr   r   r   r   r   r      s7        J1 1 1 \1 1 1r   r   c                   .    e Zd ZddZddd	edd
ddfdZdS )r   hook_contextr   detailshintsr   Nc                 r    t          |j        t                    rt          |j        |j                   d S d S N)
isinstancevalueboolr   flag_key)selfr   r   r    s       r   afterzOpenFeatureHook.after   s;    gmT** 	>W-w}=====	> 	>r   r
   	exceptionr   c                 r    t          |j        t                    rt          |j        |j                   d S d S r"   )r#   default_valuer%   r   r&   )r'   r   r)   r    s       r   errorzOpenFeatureHook.error   sB     l0$77 	P\2L4NOOOOO	P 	Pr   )r   r   r   r   r    r   r   N)r   r   r   r(   	Exceptionr,   r   r   r   r   r      sf        > > > >P)P6?PHSP	P P P P P 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>r3      s%   % % % % % % % % 5 5 5 5 5 5 = = = = = = = =7%%%%%% <;;;;;;;; 7 7 7
,5
6
6671 1 1 1 1[ 1 1 1	P 	P 	P 	P 	Pd 	P 	P 	P 	P 	Ps	   / A 