
    01i                         S r SSKJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      rg)zExceptions module for rfc3986.   )compatc                       \ rS rSrSrSrg)RFC3986Exception   z-Base class for all rfc3986 exception classes. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       L/home/james-whalen/.local/lib/python3.13/site-packages/rfc3986/exceptions.pyr   r      s    7r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InvalidAuthority   z/Exception when the authority string is invalid.c                 r   > [         [        U ]  SR                  [        R
                  " U5      5      5        g)z4Initialize the exception with the invalid authority.z!The authority ({0}) is not valid.N)superr   __init__formatr   to_str)self	authority	__class__s     r   r   InvalidAuthority.__init__   s-    .077i(	
r   r   r	   r
   r   r   r   r   r   __classcell__r   s   @r   r   r      s    9
 
r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InvalidPort   z#Exception when the port is invalid.c                 J   > [         [        U ]  SR                  U5      5        g)z/Initialize the exception with the invalid port.zThe port ("{0}") is not valid.N)r   r!   r   r   )r   portr   s     r   r   InvalidPort.__init__   s     k4),33D9	
r   r   r   r   s   @r   r!   r!      s    -
 
r   r!   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ResolutionError#   z1Exception to indicate a failure to resolve a URI.c                 f   > [         [        U ]  SR                  UR	                  5       5      5        g)z)Initialize the error with the failed URI.z{0} is not an absolute URI.N)r   r'   r   r   unsplit)r   urir   s     r   r   ResolutionError.__init__&   s&    ot-)00?	
r   r   r   r   s   @r   r'   r'   #   s    ;
 
r   r'   c                       \ rS rSrSrSrg)ValidationError-   z,Exception raised during Validation of a URI.r   Nr   r   r   r   r.   r.   -   s    6r   r.   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )MissingComponentError3   z6Exception raised when a required component is missing.c                    > Sn[        U5      S:  a  SnXl        [        U5      U l        SR	                  U R                  5      n[
        [        U ]  SR                  XC5      UU R                  5        g)z5Initialize the error with the missing component name.wasr   were, z{} {} required but missingN)	lenr+   sorted
componentsjoinr   r1   r   r   r   r+   component_namesverbr9   r   s        r   r   MissingComponentError.__init__6   se    !#D 1YYt/
#T3(//
AOO	
r   r9   r+   r   r   s   @r   r1   r1   3   s    @
 
r   r1   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )UnpermittedComponentErrorF   z;Exception raised when a component has an unpermitted value.c           
         > [         [        U ]  SR                  U[	        [        U5      5      U5      UUU5        Xl        X l        X0l        g)z4Initialize the error with the unpermitted component.z.{} was required to be one of {!r} but was {!r}N)	r   rA   r   r   listr8   component_namecomponent_valueallowed_values)r   rE   rF   rG   r   s       r   r   "UnpermittedComponentError.__init__I   sS    '7<CCVN+,
 		
 -.,r   )rG   rE   rF   r   r   s   @r   rA   rA   F   s    E- -r   rA   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )PasswordForbiddenZ   zCException raised when a URL has a password in the userinfo section.c                    >^ [        TSU4S j5      n[        [        U ]  SR	                  U" 5       5      5        TU l        g)z9Initialize the error with the URI that failed validation.r*   c                     > T $ )Nr   r+   s   r   <lambda>,PasswordForbidden.__init__.<locals>.<lambda>_   s    #r   z4"{}" contained a password when validation forbade itN)getattrr   rJ   r   r   r+   )r   r+   r*   r   s    ` r   r   PasswordForbidden.__init__]   s=    #y+6/BII		

 r   rN   r   r   s   @r   rJ   rJ   Z   s    M r   rJ   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InvalidComponentsErrorh   z9Exception raised when one or more components are invalid.c                    > Sn[        U5      S:  a  SnXl        [        U5      U l        SR	                  U R                  5      n[
        [        U ]  SR                  XC5      UU R                  5        g)z8Initialize the error with the invalid component name(s).r4   r   r5   r6   z{} {} found to be invalidN)	r7   r+   r8   r9   r:   r   rT   r   r   r;   s        r   r   InvalidComponentsError.__init__k   se    !#D 1YYt/
$d4'..z@OO	
r   r?   r   r   s   @r   rT   rT   h   s    C
 
r   rT   c                       \ rS rSrSrSrg)MissingDependencyError{   zBException raised when an IRI is encoded without the 'idna' module.r   Nr   r   r   r   rY   rY   {   s    Lr   rY   N)r    r   	Exceptionr   r   r!   r'   r.   r1   rA   rJ   rT   rY   r   r   r   <module>r]      s    $ 	y 		
' 	

" 

& 
	& 	
O 
&- -( 
_ 
&M- Mr   