
    Wi                         U d Z ddlmZmZ ddlmZmZmZmZm	Z	m
Z
 e	d e
d ed ed ed ed	 iZeee   eegef   f   ed
<   dedee   fdZy)zCLI error handling utilities.    )CallableOptional)GatedRepoErrorHfHubHTTPErrorLocalTokenNotFoundErrorRemoteEntryNotFoundErrorRepositoryNotFoundErrorRevisionNotFoundErrorc                      	 y)Nz~Repository not found. Check the `repo_id` and `repo_type` parameters. If the repo is private, make sure you are authenticated. es    g/home/sietch6/trending-topics-pipeline/venv/lib/python3.12/site-packages/huggingface_hub/cli/_errors.py<lambda>r      s     	I     c                      y)Nz3Revision not found. Check the `revision` parameter.r   r   s    r   r   r           r   c                      y)Nz1Access denied. This repository requires approval.r   r   s    r   r   r   !   r   r   c                      y)Nz)Not logged in. Run 'hf auth login' first.r   r   s    r   r   r   "   r   r   c                      y)NzFile not found in repository.r   r   s    r   r   r   #   r   r   c                     t        |       S N)strr   s    r   r   r   $   s
    c!f r   CLI_ERROR_MAPPINGSr   returnc                 h    t         j                         D ]  \  }}t        | |      s ||       c S  y r   )r   items
isinstance)r   exc_type	formatters      r   format_known_exceptionr!   (   s8    1779  )a"Q<  r   N)__doc__typingr   r   huggingface_hub.errorsr   r   r   r   r	   r
   r   dicttype	Exceptionr   __annotations__r!   r   r   r   <module>r)      s    $ %    ZQRG$	I Di(I;3C*DDE 	i HSM r   