U
    nËj\  ã                   @  s„   U d dl mZ d dlmZ d dlZd dlZd dlmZm	Z	m
Z
 erNddlmZ dZded< dad	ed
< daded< ddœdd„ZdS )é    )ÚannotationsN)ÚTYPE_CHECKINGÚFinalÚIterableé   )ÚPydanticPluginProtocolZpydanticz
Final[str]ÚPYDANTIC_ENTRY_POINT_GROUPz(dict[str, PydanticPluginProtocol] | NoneÚ_pluginsFÚboolÚ_loading_pluginsz Iterable[PydanticPluginProtocol])Úreturnc                  C  sè   t  d¡} trdS | dkrdS tdkrài adazªt ¡ D ]œ}|jD ]�}|jtkrRqB|j	tkr^qB| dk	rx|j
|  d¡krxqBz| ¡ t|j	< W qB ttfk
rÐ } z$t |jj› d|j
› d	|›�¡ W 5 d}~X Y qBX qBq8W 5 daX t ¡ S )
z‚Load plugins for Pydantic.

    Inspired by: https://github.com/pytest-dev/pluggy/blob/1.3.0/src/pluggy/_manager.py#L376-L402
    ZPYDANTIC_DISABLE_PLUGINS© )Ú__all__Ú1ÚtrueNTFú,z while loading the `z7` Pydantic plugin, this plugin will not be installed.

)ÚosÚgetenvr   r	   Úimportlib_metadataÚdistributionsÚentry_pointsÚgroupr   ÚvalueÚnameÚsplitÚloadÚImportErrorÚAttributeErrorÚwarningsÚwarnÚ	__class__Ú__name__Úvalues)Zdisabled_pluginsÚdistZentry_pointÚer   r   ú;/tmp/pip-unpacked-wheel-zvl9l234/pydantic/plugin/_loader.pyÚget_plugins   s2    



ÿr&   )Ú
__future__r   Úimportlib.metadataÚmetadatar   r   r   Útypingr   r   r   Ú r   r   Ú__annotations__r	   r   r&   r   r   r   r%   Ú<module>   s    