o
    jx
                     @  s|   d dl mZ d dlZd dlZd dlZd dlZdgZdddZejdkr*d d	l	m
Z
 nG d
d deZ
ejG dd dZdS )    )annotationsNExceptionGroupreturn	list[str]c                   C  s   t S N)__all__ r   r   ]/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/pip/_vendor/packaging/errors.py__dir__   s   r
   )      )r   c                   @  s6   e Zd ZU dZded< ded< ddd	Zdd
dZdS )r   zA minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11.

        If :external:exc:`ExceptionGroup` is already defined by Python itself,
        that version is used instead.
        strmessagelist[Exception]
exceptionsr   Nonec                 C  s   || _ || _d S r   )r   r   )selfr   r   r   r   r	   __init__   s   
zExceptionGroup.__init__c                 C  s   | j j d| jd| jdS )N(z, ))	__class____name__r   r   )r   r   r   r	   __repr__!   s   zExceptionGroup.__repr__N)r   r   r   r   r   r   )r   r   )r   
__module____qualname____doc____annotations__r   r   r   r   r   r	   r      s   
 
c                   @  s\   e Zd ZU dZejeddZded< dd
dZ	e
jdddZe
jdddZdddZdS )_ErrorCollectora  
    Collect errors into ExceptionGroups.

    Used like this:

        collector = _ErrorCollector()
        # Add a single exception
        collector.error(ValueError("one"))

        # Supports nesting, including combining ExceptionGroups
        with collector.collect():
            raise ValueError("two")
        collector.finalize("Found some errors")

    Since making a collector and then calling finalize later is a common pattern,
    a convenience method ``on_exit`` is provided.
    F)default_factoryinitr   errorsmsgr   r   r   c                 C  s   | j r	t|| j dS )z0Raise a group exception if there are any errors.N)r    r   r   r!   r   r   r	   finalize;   s   z_ErrorCollector.finalize-typing.Generator[_ErrorCollector, None, None]c                 c  s    | V  |  | dS )zx
        Calls finalize if no uncollected errors were present.

        Uncollected errors are raised normally.
        N)r#   r"   r   r   r	   on_exit@   s   z_ErrorCollector.on_exiterr_clstype[Exception]"typing.Generator[None, None, None]c              
   g  s~    |pt f}zdV  W dS  ty& } z| j|j W Y d}~dS d}~w |y> } z| j| W Y d}~dS d}~ww )z
        Context manager to collect errors into the error list.

        Must be inside loops, as only one error can be collected at a time.
        N)	Exceptionr   r    extendr   append)r   r&   Zerror_classeserrorr   r   r	   collectJ   s   
z_ErrorCollector.collectr,   r)   c                 C  s   | j | dS )zAdd an error to the list.N)r    r+   )r   r,   r   r   r	   r,   Y   s   z_ErrorCollector.errorN)r!   r   r   r   )r!   r   r   r$   )r&   r'   r   r(   )r,   r)   r   r   )r   r   r   r   dataclassesfieldlistr    r   r#   
contextlibcontextmanagerr%   r-   r,   r   r   r   r	   r   %   s   
 
	r   )r   r   )
__future__r   r1   r.   systypingr   r
   version_infobuiltinsr   r)   	dataclassr   r   r   r   r	   <module>   s    

