+
    –°³j  ã                   ól  a € R  t"0 t R t^ RIt^ RIHt ^ RIHtHtHtH	t	H
t
HtHtHtHtHtHtHtHtHtHtHt R R ltR R ltR R	 ltR
 R ltR R ltR R ltR R ltR R ltR R lt/ ]R b]]b]]b]]b]]b]R b]R b]	R b]]b]]b]]b]
R b]R b]R b]R b]]b]]bt ] ^ k R R lt!R# )!zCLI error handling utilities.N)ÚCallable)ÚBucketNotFoundErrorÚCLIErrorÚCLIExtensionInstallErrorÚDeviceCodeErrorÚEntryNotFoundErrorÚGatedRepoErrorÚHfHubHTTPErrorÚ
HfUriErrorÚIncompleteSnapshotErrorÚLocalEntryNotFoundErrorÚLocalTokenNotFoundErrorÚOfflineModeIsEnabledÚ	OIDCErrorÚRemoteEntryNotFoundErrorÚRepositoryNotFoundErrorÚRevisionNotFoundErrorc                ó0   € V ^8„  d   QhR\         R\        /# ©é   ÚerrorÚreturn)r   Ústr)Úformats   "Ú\/home/luca/screen-checking/.venv/lib/python3.14/site-packages/huggingface_hub/cli/_errors.pyÚ__annotate__r   '   s   € ÷ ñ Ô"9ð ¼cñ ó    c                 ó¤  € V P                   '       d   V P                   P                  4       MR pV P                  '       d   V RV P                   R2pMV R2pVR,          pVR,          pV P                  eO   V P                   '       d!   V P                   R8w  d   RV P                    2MRpVR	V P                   V 2,          pV# VR
,          pV# )Ú
Repositoryú 'ú' not found.z not found.ze
If the repo is private, make sure you are authenticated and your token has the required permissions.z-
If the repo does not exist, create it with: Úmodelz --type Ú zhf repos create zhf repos create <repo_id>)Ú	repo_typeÚ
capitalizeÚrepo_id)r   ÚlabelÚmsgÚ	type_flags   &   r   Ú_format_repo_not_foundr)   '   sÄ   € Ø,1¯O¯O¨OˆE�O‰O×&Ñ&Ô(À€EØ‡}‡}€}Ø��r˜%Ÿ-™-˜¨Ð5‰à��{Ð#ˆØÐsÕs€CàÐ;Õ;€CØ‡}�}Ò Ø49·O·O°OÈÏÉÐ[bÔHb�h˜uŸ™Ð/Ñ0Ðhjˆ	ØÐ! %§-¡- °°Ð<Õ<ˆð €Jð 	Ð*Õ*ˆà€Jr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   9   s   € ÷ =ñ =œnð =´ñ =r   c                 ó´   € V P                   '       d   V P                   MR pV P                  '       d"   RVP                  4        RV P                   R2# RV R2# )Ú
repositoryzAccess denied. r   z' requires approval.zAccess denied. This z requires approval.)r#   r%   r$   ©r   r&   s   & r   Ú_format_gated_repor.   9   sR   € Ø$ŸŸ˜ˆE�OŠO°L€EØ‡}‡}€}Ø  ×!1Ñ!1Ó!3Ð 4°B°u·}±}°oÐEYÐZÐZØ! % Ð(;Ð<Ð<r   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   @   s   € ÷ 	ñ 	Ô$7ð 	¼Cñ 	r   c                 óœ   € V P                   '       d!   R V P                    R2pRV P                    2pMRpRpVR,          pVRV 2,          pV# )zBucket 'r    zhf buckets create zBucket not found.zhf buckets create <bucket_id>zg
If the bucket is private, make sure you are authenticated and your token has the required permissions.z/
If the bucket does not exist, create it with: )Ú	bucket_id)r   r'   Úcmds   &  r   Ú_format_bucket_not_foundr3   @   s[   € Ø‡‡€Ø˜Ÿ™Ð)¨Ð6ˆØ" 5§?¡?Ð"3Ð4‰à!ˆØ-ˆØÐuÕu€CØÐ=¸c¸UÐCÕC€CØ€Jr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   L   s   € ÷ 	ñ 	Ô#;ð 	Äñ 	r   c                 ó,  € V P                   '       d   V P                   MR pV P                  '       d    \        V P                  P                  4      MRpV P                  '       d   RV RV P                   R2pMRV R2pV'       d   VRV 2,          pV# )r,   NzFile not found in r   ú'.Ú.z
URL: )r#   Úresponser   Úurlr%   )r   r&   r9   r'   s   &   r   Ú_format_entry_not_foundr:   L   sz   € Ø$ŸŸ˜ˆE�OŠO°L€EØ%*§^§^ ^Œ#ˆe�n‰n× Ñ Ô
!¸€CØ‡}‡}€}Ø" 5 '¨¨E¯M©M¨?¸"Ð=‰à" 5 '¨Ð+ˆß
Ø�˜˜ˆÕˆØ€Jr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   X   s   € ÷ -ñ -Ô)@ð -ÄSñ -r   c                 ó6   € V P                   pVe   RV 2# RV  2# )NzLocal entry not found. )Ú	__cause__)r   Úcauses   & r   Ú_format_local_entry_not_foundr?   X   s+   € Ø�O‰O€EØÒØ(¨¨Ð0Ð0Ø$ U GÐ,Ð,r   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   _   s   € ÷ ñ Ô'>ð Ä3ñ r   c                 óH   € \        V 4      pVR V P                   2,          pV# )z#
Incomplete snapshot available at: )r?   Úsnapshot_path)r   r'   s   & r   Ú_format_incomplete_snapshotrC   _   s*   € Ü
'¨Ó
.€CØÐ1°%×2EÑ2EÐ1FÐGÕG€CØ€Jr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   e   s   € ÷ Kñ KÔ&;ð KÄñ Kr   c                 ó˜   € V P                   '       d   V P                   MR pV P                  '       d   RV RV P                   R2# RV R2# )r,   zRevision not found in r   r6   z. Check the revision parameter.)r#   r%   r-   s   & r   Ú_format_revision_not_foundrF   e   sG   € Ø$ŸŸ˜ˆE�OŠO°L€EØ‡}‡}€}Ø'¨ w¨b°·±°¸rÐBÐBØ# E 7Ð*IÐJÐJr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   l   s   € ÷ ñ œXð ¬#ñ r   c                ó   € \        V 4      # )z%No traceback, just the error message.©r   ©r   s   &r   Ú_format_cli_errorrK   l   s   € äˆu‹:Ðr   c                ó0   € V ^8„  d   QhR\         R\        /# r   )r   r   )r   s   "r   r   r   q   s   € ÷ "ñ "Ô/Gð "ÌCñ "r   c                óà   € V P                   eY   RP                  \        P                  ! \	        V P                   4      V P                   V P                   P
                  4      4      MRpV RV  2# )a   Format a CLI extension installation error.

The error is likely to be a tricky subprocess error to investigate. In this specific case we want to format the
traceback of the root cause while keeping the "nicely formatted" error message of the CLIExtensionInstallError
as a 1-line message.
r"   Ú
)r=   ÚjoinÚ	tracebackÚformat_exceptionÚtypeÚ__traceback__)r   Úcause_tbs   & r   Ú#_format_cli_extension_install_errorrU   q   s`   € ð �?‰?Ò&ð 	�‰”	×*Ò*¬4°·±Ó+@À%Ç/Á/ÐSX×SbÑSb×SpÑSpÓqÔràð ð
 ˆZ�r˜%˜Ð!Ð!r   c                 ó   € \        V 4      # ©NrI   rJ   s   &r   Ú<lambda>rX   �   s   € ¬¨E¬
r   c                 ó   € R # )z)Not logged in. Run 'hf auth login' first.© )Ú_s   &r   rX   rX   ‡   s   € Ñ'Rr   c                 ó   € R V  2# )zOIDC Exchange failed. rZ   rJ   s   &r   rX   rX   ˆ   s   € Ð5°e°WÑ=r   c                 ó   € R V  2# )zLogin failed: rZ   rJ   s   &r   rX   rX   ‰   s   €  ^°E°7Ñ#;r   c                 ó   € \        V 4      # rW   rI   rJ   s   &r   rX   rX   Ž   s   € ¤c¨%¤jr   c                 ó   € \        V 4      # rW   rI   rJ   s   &r   rX   rX   �   s   € ¤# e¤*r   c                 ó:   € R V P                    RV P                   2# )zInvalid HF URI: z. )Úurir'   rJ   s   &r   rX   rX   �   s   € Ð 0°·±°¸2¸e¿i¹i¸[ÑIr   c                 ó   € R V  2# )zInvalid value. rZ   rJ   s   &r   rX   rX   ‘   s   €  °¨wÑ7r   c                ó>   € V ^8„  d   QhR\         R\        R,          /# )r   r   r   N)Ú	Exceptionr   )r   s   "r   r   r   —   s   € ÷ ñ ¤)ð ´°dµ
ñ r   c                 óv   € \         P                  4        F   w  r\        W4      '       g   K  V! V 4      u # 	  R # rW   )ÚCLI_ERROR_MAPPINGSÚitemsÚ
isinstance)r   Úexc_typeÚ	formatters   &  r   Úformat_known_exceptionrk   —   s3   € Ü1×7Ñ7Ö9ÑˆÜ�e×&Ô&Ù˜UÓ#Ò#ñ  :ñ r   c                ó’   € V ^8„  d   Qh/ ^ \         9   d3   \        \        \        ,          \        R\
        3,          3,          ;R&   # )r   .rf   )Ú__conditional_annotations__ÚdictrR   rd   r   r   )r   s   "r   r   r      s7   € × #Ñ #÷dò ”Dœœi�¬(°3¼°8Õ*<Ð<Õ=ñ òe $r   )#rm   Ú__doc__rP   Úcollections.abcr   Úhuggingface_hub.errorsr   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r)   r.   r3   r:   r?   rC   rF   rK   rU   Ú
ValueErrorrf   rk   r   )rm   s   @r   Ú<module>rs      sW  øðö $ã Ý $÷÷ ÷ ÷ ó õ(õ$=õ	õ	õ-õõKõõ
"ðAØÑ2ðAð Ð&ðAð Ð1ð	Að
 Ð3ðAð Ð5ðAð ÑRðAð Ñ=ðAð Ñ;ðAð Ð5ðAð Ð8ðAð Ð:ðAð Ñ0ðAð Ñ,ðAð  ÑIð!Að" Ñ7ð#Að$ ÐAð%Að& Ðð'AÐ ó ÷.r   