a
    Šxdq  ã                   @   s¤   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 e	r|d dl
mZ d dl
mZ d dl
mZ d d	l
mZ d d
lmZ dadd„ Zdd„ ZG dd„ deƒZdS )é    )Úabsolute_import)ÚHub)ÚIntegration©Úadd_global_event_processor)ÚMYPY)ÚAny)ÚDict)ÚTuple)ÚIterator)ÚEventNc                  c   s@   zdd l } W n ty    Y d S 0 | jD ]}|j|jfV  q(d S )Nr   )Úpkg_resourcesÚImportErrorÚworking_setÚkeyÚversion)r   Úinfo© r   úW/var/www/html/Ranjet/env/lib/python3.9/site-packages/sentry_sdk/integrations/modules.pyÚ_generate_installed_modules   s    
r   c                   C   s   t d u rttƒ ƒa t S )N)Ú_installed_modulesÚdictr   r   r   r   r   Ú_get_installed_modules    s    
r   c                   @   s   e Zd ZdZedd„ ƒZdS )ÚModulesIntegrationÚmodulesc                  C   s   t dd„ ƒ} d S )Nc                 S   s4   |   d¡dkr| S tj t¡d u r&| S tƒ | d< | S )NÚtypeZtransactionr   )Úgetr   ÚcurrentZget_integrationr   r   )ÚeventÚhintr   r   r   Ú	processor.   s    
z0ModulesIntegration.setup_once.<locals>.processorr   )r    r   r   r   Ú
setup_once+   s    zModulesIntegration.setup_onceN)Ú__name__Ú
__module__Ú__qualname__Ú
identifierÚstaticmethodr!   r   r   r   r   r   (   s   r   )Ú
__future__r   Zsentry_sdk.hubr   Zsentry_sdk.integrationsr   Zsentry_sdk.scoper   Zsentry_sdk._typesr   Útypingr   r	   r
   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   