
    <yh                       S r SSKJr  SSKJr  SSKJr  SSKJr  \(       a  SSK	r	SSK
Jr  SSKJ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 jrSS.SS jjrg)zCustom exceptions.    )annotations)TYPE_CHECKING)
CondaError)ChannelN)Iterable)Path)Selfc                      \ rS rSrSrSrg)CondaToSError   zBase exception. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       =lib/python3.13/site-packages/conda_anaconda_tos/exceptions.pyr   r      s    r   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )CondaToSMissingError   z;Error class for when the metadata is missing for a channel.c                >   > [         TU ]  S[        U5       S35        g)+Format error message with channel base URL.zNo Terms of Service for .Nsuper__init___urlselfchannel	__class__s     r   r   CondaToSMissingError.__init__   s    3DM?!DEr   r   r!   r	   r"   str | ChannelreturnNoner   r   r   r   r   r   r   __classcell__r#   s   @r   r   r      s    EF Fr   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )CondaToSInvalidError   z;Error class for when the metadata is invalid for a channel.c                >   > [         TU ]  S[        U5       S35        g)r   zInvalid Terms of Service for r   Nr   r    s     r   r   CondaToSInvalidError.__init__"   s    8gqIJr   r   r%   r)   r+   s   @r   r-   r-      s    EK Kr   r-   c                  D   ^  \ rS rSrSr S       SU 4S jjjrSrU =r$ )CondaToSPermissionError'   z9Error class for when the metadata file cannot be written.c                `   > U(       a  S[        U5       3OSn[        TU ]	  SU SU S35        g)z4Format error message with channel base URL and path.z for  zUnable to read/write path ()z. Please check permissions.N)r   r   r   )r!   pathr"   addendumr#   s       r   r    CondaToSPermissionError.__init__*   s9     /6U4=/*2)$q
:UV	
r   r   N)r!   r	   r7   zstr | os.PathLike[str] | Pathr"   zstr | Channel | Noner'   r(   r)   r+   s   @r   r2   r2   '   s9    C
 )-	
	
+	
 &	
 
		
 	
r   r2   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )CondaToSRejectedError6   zEError class for when the Terms of Service are rejected for a channel.c           	     Z   > [         TU ]  S[        [        [        U5      5       S35        g)r   zoTerms of Service has been rejected for the following channels. Please remove or accept them before proceeding:
uQ  

To remove channels with rejected Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
    ‣ conda config --remove channels CHANNEL

To accept a channel's Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
    ‣ conda tos accept --override-channels --channel CHANNELNr   r   _bulletmapr   r!   channelsr#   s     r   r   CondaToSRejectedError.__init__9   s4    @s4*+, -M
N	
r   r   r!   r	   rC   r&   r'   r(   r)   r+   s   @r   r<   r<   6   s    O
 
r   r<   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )CondaToSNonInteractiveErrorJ   zMError class when Terms of Service are not actionable in non-interactive mode.c           	     Z   > [         TU ]  S[        [        [        U5      5       S35        g)r   ztTerms of Service have not been accepted for the following channels. Please accept or remove them before proceeding:
uQ  

To accept a channel's Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
    ‣ conda tos accept --override-channels --channel CHANNEL

To remove channels with rejected Terms of Service, run the following and replace `CHANNEL` with the channel name/URL:
    ‣ conda config --remove channels CHANNELNr?   rB   s     r   r   $CondaToSNonInteractiveError.__init__M   s2    @s4*+, -=
>	
r   r   rE   r)   r+   s   @r   rG   rG   J   s    W
 
r   rG   c                P    [        [        U 5      R                  =(       d    U 5      $ r:   )strr   base_url)r"   s    r   r   r   ^   s    ww((3G44r   u       • )prefixc               0    USU 3R                  U 5      -   $ )N
)join)argsrN   s     r   r@   r@   b   s    bM&&t,,,r   )r"   r&   r'   rL   )rR   zIterable[str]rN   rL   r'   rL   )r   
__future__r   typingr   conda.exceptionsr   conda.models.channelr   oscollections.abcr   pathlibr   r	   r   r   r-   PermissionErrorr2   r<   rG   r   r@   r   r   r   <module>r[      s     "   ' ((J F= FK/ K
o} 

M 
(
- 
(5 3= - -r   