+
    \i                    ^   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt. ROt	R R lt
 ! R R]4      t ! R	 R
]4      t ! R R]4      t]P                   R8  d   ]P"                  tM ! R R]4      t]P$                   ! R R4      4       t]P$                  ! 4        ! R R]4      4       tR# )a  
This module defines exceptions and error handling utilities. It is the
recommend path to access ``ConfiguratonError``, ``ConfigurationWarning``, and
``ExceptionGroup``. For backward compatibility, ``ConfigurationError`` is
re-exported in the top-level package.
)annotationsNConfigurationErrorConfigurationWarningExceptionGroupc                   V ^8  d   QhRR/# )   returnz	list[str] )formats   "e/home/piyush/.cache/uv/builds-v0/.tmpPfdyTF/lib/python3.14/site-packages/pyproject_metadata/errors.py__annotate__r      s           c                     \         # )N)__all__r	   r   r   __dir__r      s    Nr   c                  P   a  ] tR t^tRtRR/R V 3R lllt]R R l4       tRtV ;t	# )	r   z
Error in the backend metadata.

Has an optional key attribute, which will be non-None if the error is
related to a single key in the pyproject.toml file.
keyNc               $    V ^8  d   QhRRRRRR/# )r   msgstrr   
str | Noner   Noner	   )r
   s   "r   r   ConfigurationError.__annotate__&   s!      C  t r   c               2   < \         SV `  V4       W n        R# )z.
Create a new error with a key (can be None).
N)super__init___key)selfr   r   	__class__s   &&$r   r   ConfigurationError.__init__&   s     		r   c                   V ^8  d   QhRR/# )r   r   r   r	   )r
   s   "r   r   r   .   s      Z r   c                    V P                   # )z
Return the stored key.
r   r   s   &r   r   ConfigurationError.key-   s    
 yyr   r"   )
__name__
__module____qualname____firstlineno____doc__r   propertyr   __static_attributes____classcell__)r   s   @r   r   r      s-    d    r   c                      ] tR t^5tRtRtR# )ConfigurationTypeErrorz7
Error in the backend metadata due to a type mismatch.
r	   Nr%   r&   r'   r(   r)   r+   r	   r   r   r.   r.   5   s    r   r.   c                      ] tR t^;tRtRtR# )r   z Warnings about backend metadata.r	   Nr/   r	   r   r   r   r   ;   s    *r   c                  H    ] tR t^Ct$ RtR]R&   R]R&   R R ltR R	 ltR
tR# )r   a  A minimal implementation of `ExceptionGroup` from Python 3.11.

Users can replace this with a more complete implementation, such as from
the exceptiongroup backport package, if better error messages and
integration with tooling is desired and the addition of a dependency is
acceptable.
r   messagelist[Exception]
exceptionsc               $    V ^8  d   QhRRRRRR/# )r   r2   r   r4   r3   r   r   r	   )r
   s   "r   r   ExceptionGroup.__annotate__O   s!     	) 	)C 	)_ 	) 	)r   c                    Wn         W n        R# )z=
Create a new group with a message and a list of exceptions.
N)r2   r4   )r   r2   r4   s   &&&r   r   ExceptionGroup.__init__O   s     #L(Or   c                   V ^8  d   QhRR/# )r   r   r   r	   )r
   s   "r   r   r6   V   s     	W 	Wc 	Wr   c                l    V P                   P                   RV P                  : RV P                  : R2# )z5
Return a repr similar to the stdlib ExceptionGroup.
(z, ))r   r%   r2   r4   r#   s   &r   __repr__ExceptionGroup.__repr__V   s3     nn--.a/?r$//ATTUVVr   )r4   r2   N)	r%   r&   r'   r(   r)   __annotations__r   r=   r+   r	   r   r   r   r   C   s%    	 ##	)	W 	Wr   c                      ] tR t^]t$ RtR]R&   ]P                  ! ]RR7      t	R]R&   R R	 lt
]P                  ]3R
 R ll4       tR R ltRtR# )SimpleErrorCollectorz
Collect errors.
boolcollect_errorsF)default_factoryinitr3   errorsc                    V ^8  d   QhRRRR/# )r   r   r   r   r   r	   )r
   s   "r   r   !SimpleErrorCollector.__annotate__f   s     3 3C 3D 3r   c                T    V P                   '       d   \        WP                   4      hR# )z0Raise a group exception if there are any errors.N)rF   r   )r   r   s   &&r   finalizeSimpleErrorCollector.finalizef   s    ;;; kk22 r   c                    V ^8  d   QhRRRR/# )r   err_clsztype[Exception]r   z"typing.Generator[None, None, None]r	   )r
   s   "r   r   rH   l   s      &	+r   c              #    "   V P                   '       d    Rx  R# Rx  R#   \         d1   pT P                  P                  TP                  4        Rp?R# Rp?iT d'   pT P                  P                  T4        Rp?R# Rp?ii ; i5i)z9Collect errors into the error list. Must be inside loops.N)rC   r   rF   extendr4   append)r   rM   errors   && r   collectSimpleErrorCollector.collectk   sj     
 *  " 5""5#3#344 *""5))*sB   B" BB%ABB!B"B=BBBc                    V ^8  d   QhRRRR/# )r   rQ   	Exceptionr   r   r	   )r
   s   "r   r   rH   z   s       
r   c                d    V P                   '       d   V P                  P                  V4       R# Vh)z2Add an error to the list, or raise it immediately.N)rC   rF   rP   )r   rQ   s   &&r   rQ   SimpleErrorCollector.errorz   s'    
 KKu%Kr   r	   N)r%   r&   r'   r(   r)   r?   dataclassesfieldlistrF   rJ   
contextlibcontextmanagerrU   rR   rQ   r+   r	   r   r   rA   rA   ]   sR     )//5QFOQ3
 )2  r   rA   c                  :    ] tR t^tRtRRRRRRRR/R R	 lltR
tR# )ErrorCollectorzt
Collect errors and raise them as a group at the end (if collect_errors is True),
otherwise raise them immediately.
r   Ngotgot_typewarnFc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r   r   r   r   r   r_   objectr`   ztype[typing.Any] | Nonera   rB   kwargsr   r   r	   )r
   s   "r   r   ErrorCollector.__annotate__   sP     9 99 	9
 9 *9 9 9 
9r   c                   VP                   ! RRRV R2/VB pVe
   V RV: R2pVe   V RVP                   R2pV'       d    \        P                  ! V\        ^R7       R# V P                  \        WR7      4       R# )	z9Raise a configuration error, or add it to the error list.r   "Nz (got r<   )
stacklevel)r   r	   )r
   r%   warningsra   r   rQ   r   )r   r   r   r_   r`   ra   rd   s   &&$$$$,r   config_errorErrorCollector.config_error   s~     jj2qQZ262?Ewa(CE 1 12!4CMM#3BJJ)#78r   r	   )r%   r&   r'   r(   r)   rj   r+   r	   r   r   r^   r^      s9    
9 	9
 9 -19 9 9r   r^   )r   r   r   )      )r)   
__future__r   builtinsr[   rX   systypingri   r   r   rU   r   r.   UserWarningr   version_infor   	dataclassrA   r^   r	   r   r   <module>ru      s    #    
   ./ +; + w,,NW W4 $ $ $N 9) 9 9r   