Files
intellecton/venv/lib/python3.12/site-packages/click/__pycache__/exceptions.cpython-312.pyc
T

118 lines
16 KiB
Plaintext
Raw Normal View History

Ë
KÀj,ãóÀ—ddlmZddlmZddlZddlmZddlm Z ddl
m Z ddl m
Z
ddlmZdd lmZej"rdd
lmZdd lmZdd lmZd'd
„Zd(d„ZGd„de«ZGd„de«ZGd„de«ZGd„de«ZGd„de«ZGd„de«ZGd„de«ZGd„de«Z Gd„d e«Z!Gd!„d"e«Z"Gd#„d$e#«Z$Gd%„d&e#«Z%y))é)Ú annotationsN)Úgettext)Úngettexté)Úget_text_stderr)Úresolve_color_default)Úecho)Úformat_filename)ÚCommand)ÚContext)Ú ParametercóZ—|�(t|t«sdjd„|D««S|S)Nz / c3ó2K—|]}t|«–—Œy­w©N©Úrepr)Ú.0Úxs úS/home/antigravity/intellecton/venv/lib/python3.12/site-packages/click/exceptions.pyú <genexpr>z$_join_param_hints.<locals>.<genexpr>sèø€Ò6 aœ$˜qŸ'Ñ6ùó‚)Ú
isinstanceÚstrÚjoin)Ú
param_hints rÚ_join_param_hintsrs,€ØÐ¤j°¼SÔ&AØ�z‰zÑ6¨:Ô6Ó6Ð6à Ðócó’—djd„t|«D««}tddt|««j ||¬«S)Nz, c3ó2K—|]}t|«–—Œy­wrr)rÚps rrz(_format_possibilities.<locals>.<genexpr>sèø€ÒG¨A¤ Q§ÑGùrzDid you mean {possibility}?z'(Did you mean one of: {possibilities}?))Ú possibilityÚ
possibilities)rÚsortedrÚlenÚformat)r"Úpossibility_strs rÚ_format_possibilitiesr'sG€Ø—i‘iÑG´¸
Ó1FÔGÓG€OÜ Ø%Ø1Ü ˆMÓó ÷
�f˜¸€fÓHð IrcóB‡—eZdZdZdZdˆfd„ Zdd„Zdd„Zd d
d„ZˆxZ S) ÚClickExceptionz8An exception that Click can handle and show to the user.rcóP•—t‰|�|«t«|_||_yr)ÚsuperÚ__init__rÚ
show_colorÚmessage)Úselfr.Ú __class__s €rr,zClickException.__init__)s#ø€Ü
‰Ñ˜Ô!ô(=Ó'>ˆŒØˆ� rcó—|jSr©r.©r/s rÚformat_messagezClickException.format_message0ó €Ø�|‰|Ðrcó—|jSrr2r3s rÚ__str__zClickException.__str__3r5rcóš—|€
t«}ttd«j|j «¬«||j
¬«y)NúError: {message}r2©ÚfileÚcolor)rr Ú_r%r4r-©r/r;s rÚshowzClickException.show6sA€Ø ˆ<Ü"Ó$ˆDä Ü
Ð Ó !× (Ñ (°×1DÑ1DÓ1FÐ (Ó GØØ—/‘/ö
r)r.rÚreturnÚNone©r@rr©r;zt.IO[t.Any] | Noner@rA)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú exit_coder,r4r7r?Ú
__classcell__©r0s@rr)r)#s&ø„ÙBð€Iõóó÷
ð
rr)có4‡—eZdZdZdZddˆfd„
Zddd„ZˆxZS)Ú
UsageErrora+An internal exception that signals a usage error. This typically
aborts any further handling.
:param message: the error message to display.
:param ctx: optionally the context that caused this error. Click will
fill in the context automatically in some situations.
écó�•—t‰|�|«||_|jr|jj|_yd|_yr)r+r,ÚctxÚcommandÚcmd)r/r.rOr0s €rr,zUsageError.__init__Ls4ø€Ü
‰Ñ˜Ô!؈ŒØ7;·x²x 4§8¡8×#3Ñ#3ˆ�ÀTˆ�rcó„—|€
t«}d}d}|j�¢|jjj|j«�s|jjj |j«}t d«j
|jjt|t¬«¬«}|›d�}|j�A|jj}t|jj«›d|›�||¬«tt d«j
|j«¬«||¬«y) NÚz"Try '{command} {option}' for help.)Úkey)rPÚoptionú
r:r9r2)rrOrPÚget_help_optionÚget_help_option_namesr=r%Ú command_pathÚmaxr$r<r Ú get_usager4)r/r;r<ÚhintÚ
help_namess rr?zUsageError.showQs €Ø ˆ<Ü"Ó$ˆD؈؈à �H‰HÐ Ø—‘× Ñ ×0Ñ0°·±Ó:ÐFàŸ™×)Ñ)×?Ñ?ÀÇÁÓIˆJôÐ9Ó:×AÑAØŸ™×-Ñ-ܘ:¬3Ô/ðBóˆDð�V˜2�;ˆDØ �8‰8Ð Ø—H‘H—N‘NˆEÜ �D—H‘H×&Ñ&Ó(Ð)¨¨D¨6Ð2¸ÀUÕ KÜ Ü
Ð Ó !× (Ñ (°×1DÑ1DÓ1FÐ (Ó GØØö
rr)r.rrOúContext | Noner@rArC)rDrErFrGrHr,r?rIrJs@rrLrLAsø„ñð€IöJ÷

ð
rrLcóF‡—eZdZdZ d dˆfd„
Zdd„ZˆxZS)Ú BadParametera
An exception that formats out a standardized error message for a
bad parameter. This is useful when thrown from a callback or type as
Click will attach contextual information to it (for instance, which
parameter it is).
.. versionadded:: 2.0
:param param: the parameter object that caused this error. This can
be left out, and Click will attach this info itself
if possible.
:param param_hint: a string that shows up as parameter name. This
can be used as alternative to `param` in cases
where custom validation should happen. If it is
a string it's used as such, if it's a list then
each item is quoted and separated.
cóB•—t‰|�||«||_||_yr)r+r,Úparamr)r/r.rOrbrr0s €rr,zBadParameter.__init__~s"ø€ô ‰Ñ˜ #Ô&؈Œ
Ø$ˆ�rcó@—|j�
|j}nW|j�&|jj|j«}n%t d«j |j ¬«St d«j t|«|j ¬«S)NzInvalid value: {message}r2z)Invalid value for {param_hint}: {message})rr.)rrbÚget_error_hintrOr=r%r.r)r/rs rr4zBadParameter.format_message‰s‚€Ø �?‰?Ð &ØŸ™‰JØ
�Z‰ZÐ
#ØŸ™×2Ñ2°4·8±8Ó<‰JäÐ/Ó0×7Ñ7ÀÇ Á Ð7ÓMÐ MäÐ<Ó=×DÑDÜ(¨Ó4¸d¿l¹lðEó
ð
r©NNN)
r.rrOr^rbúParameter | Nonerúcabc.Sequence[str] | str | Noner@rArB©rDrErFrGr,r4rIrJs@rr`r`lsMø„ñð(#Ø"&Ø6:ð %àð %ðð %ð ð %ð
4ð %ð
õ
%÷

rr`cóV‡—eZdZdZ d dˆfd„
Zdd„Zdd„ZˆxZS)ÚMissingParameteraœRaised if click required an option or argument but it was not
provided when invoking the script.
.. versionadded:: 4.0
:param param_type: a string that indicates the type of the parameter.
The default is to inherit the parameter type from
the given `param`. Valid values are ``'parameter'``,
``'option'`` or ``'argument'``.
có@•—t‰|�|xsd|||«||_y)NrS)r+r,Ú
param_type)r/r.rOrbrrlr0s €rr,zMissingParameter.__init__¢s#ø€ô ‰Ñ˜š B¨¨U°JÔ?Ø$ˆ�rcó¨—|j�
|j}n4|j�&|jj|j«}nd}t |«}|rd|›�nd}|j
}|€"|j�|jj }|j}|j�J|jjj|j|j¬«}|r
|r |d|›�z
}n|}|rd|›�nd}|dk(r td«}n=|dk(r td«}n,|d k(r td
«}ntd «j|¬ «}|›|›d
|›�S)Nú rS)rbrOz. ÚargumentzMissing argumentrUzMissing optionÚ parameterzMissing parameterzMissing {param_type})rlú.) rrbrdrOrrlÚparam_type_namer.ÚtypeÚget_missing_messager=r%)r/rrlÚmsgÚ msg_extraÚmissings rr4zMissingParameter.format_message­sP€Ø �?‰?Ð &Ø:>¿/¹/‰JØ
�Z‰ZÐ
#ØŸ™×2Ñ2°4·8±8Ó<‰JàˆJä& zÓ2ˆ
Ù)3�q˜˜ Ñ%¸ˆ
à—_‘_ˆ
Ø Ð  $§*¡*Ð"8ØŸ™×3Ñ3ˆJà�l‰lˆØ �:‰:Ð !ØŸ
™
Ÿ™×;Ñ;Ø—j‘j d§h¡hð<óˆIñÙØ˜R  ˜{Ð+Ñ+‘Cà#�Cá��#�‰i Bˆð ˜Ò #ÜÐ*Ó+‰GØ
˜8Ò
#ÜÐ(Ó)‰GØ
˜;Ò
&ÜÐ+Ó,‰GäÐ.Ó/×6Ñ6À*Ð6ÓMˆGà�˜:˜, a¨ uÐ-Ð-rcó°—|js?|jr|jjnd}td«j |¬«S|jS)NzMissing parameter: {param_name})Ú
param_name)r.rbÚnamer=r%)r/rys rr7zMissingParameter.__str__ÕsB€Ø�|Š|Ø,0¯JªJ˜Ÿ™Ÿš¸DˆJÜÐ6Ó7×>Ñ>È*Ð>ÓUÐ Uà—<‘<Ð r)NNNNN) r.ú
str | NonerOr^rbrfrrgrlr{r@rArB)rDrErFrGr,r4r7rIrJs@rrjrj–scø„ñ ð#Ø"Ø"&Ø6:Ø!%ð
%àð %ðð %ð ð %ð
4ð %ð ð
%ð
õ %ó&.÷P rrjcóF‡—eZdZdZ d dˆfd„
Zdd„ZˆxZS)Ú NoSuchOptionzbRaised if Click attempted to handle an option that does not exist.
.. versionadded:: 4.0
c󪕗|€td«j|¬«}t‰|�
||«||_d|_|rddlm}|||«|_yy)NzNo such option {name!r}.©rzr©Úget_close_matches)r=r%r+r,Ú option_namer"Údifflibr�)r/r‚r.r"rOr�r0s €rr,zNoSuchOption.__init__ãs\ø€ð ˆ?ÜÐ2Ó3×:Ñ:À Ð:ÓLˆGä
‰Ñ˜ #Ô&Ø&ˆÔØ/3ˆÔÙ Ý 1á!2°;À
Ó!NˆDÕ ð rcóz—|js |jS|j›dt|j«›�S©Nrn©r"r.r'r3s rr4zNoSuchOption.format_messageõó7€Ø×!Ò!Ø—<‘<Ð Ø—,‘,�˜qÔ!6°t×7IÑ7IÓ!JÐ KÐLÐLrre)
r‚rr.r{r"úcabc.Iterable[str] | NonerOr^r@rArBrhrJs@rr}r}ÝsTø„ñð#Ø37Ø"ð OàðOððOð1ð Oð
ð Oð
õ
O÷$Mrr}cóF‡—eZdZdZ d dˆfd„
Zdd„ZˆxZS)Ú