
    bix
                        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Zej        dk    rd dl	m
Z
 n G d	 de          Z
ej         G d
 d                      ZdS )    )annotationsNExceptionGroupreturn	list[str]c                     t           S N)__all__     h/home/jenkins/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/packaging/errors.py__dir__r      s    Nr   )      )r   c                  8    e Zd ZU dZded<   ded<   ddZ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                "    || _         || _        d S r   )r   r   )selfr   r   s      r   __init__zExceptionGroup.__init__   s    "DL(DOOOr   c                @    | j         j         d| j        d| j        dS )N(z, ))	__class____name__r   r   )r   s    r   __repr__zExceptionGroup.__repr__!   s*    n-VVVV$/VVVVr   N)r   r   r   r   r   r   )r   r   )r   
__module____qualname____doc____annotations__r   r   r
   r   r   r   r      se         	 	 	####	) 	) 	) 	)	W 	W 	W 	W 	W 	Wr   c                      e Zd ZU dZ ej        ed          Zded<   dd
Z	e
j        dd            Ze
j        dd            Z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                >    | j         rt          || j                   dS )z0Raise a group exception if there are any errors.N)r'   r   r   r(   s     r   finalizez_ErrorCollector.finalize;   s(    ; 	3 dk222	3 	3r   -typing.Generator[_ErrorCollector, None, None]c              #  <   K   | V  |                      |           dS )zx
        Calls finalize if no uncollected errors were present.

        Uncollected errors are raised normally.
        N)r+   r*   s     r   on_exitz_ErrorCollector.on_exit@   s)       


cr   err_clstype[Exception]"typing.Generator[None, None, None]c              '     K   |pt           f}	 dV  dS # t          $ r*}| j                            |j                   Y d}~dS d}~w|$ r%}| j                            |           Y d}~dS d}~ww xY 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/   error_classeserrors       r   collectz_ErrorCollector.collectJ   s        /I<	&EEEEE 	1 	1 	1Ku/000000000 	& 	& 	&Ku%%%%%%%%%	&s     
A0AA0A++A0r7   r3   c                :    | j                             |           dS )zAdd an error to the list.N)r'   r5   )r   r7   s     r   r7   z_ErrorCollector.errorY   s     
 	5!!!!!r   N)r(   r   r   r   )r(   r   r   r,   )r/   r0   r   r1   )r7   r3   r   r   )r   r   r    r!   dataclassesfieldlistr'   r"   r+   
contextlibcontextmanagerr.   r8   r7   r
   r   r   r$   r$   %   s          $ 0k/5QQQFQQQQ3 3 3 3
     & & & &" " " " " "r   r$   )r   r   )
__future__r   r=   r:   systypingr	   r   version_infobuiltinsr   r3   	dataclassr$   r
   r   r   <module>rE      s    " " " " " "         



 
    w'''''''W W W W W W W W$ 8" 8" 8" 8" 8" 8" 8" 8" 8" 8"r   