Files
aitsc/.venv/Lib/site-packages/click/__pycache__/exceptions.cpython-312.pyc

135 lines
14 KiB
Plaintext
Raw Normal View History

2025-02-23 09:07:52 +08:00
<EFBFBD>
2025-08-16 19:28:45 +08:00
<00><18>h<EFBFBD>&<00><00><><00>ddlZddlmZddlmZddlmZddlmZddl m
2025-02-23 09:07:52 +08:00
Z
ddl m Z ejrdd l mZdd
l mZdd l mZd ej"ej$ej&eefd ej"efd<0E>ZGd<0F>de<16>ZGd<11>de<17>ZGd<13>de<18>ZGd<15>de<19>ZGd<17>de<18>ZGd<19>de<18>ZGd<1B>de<18>ZGd<1D>de<17>ZGd<1F>d e<1F>Z Gd!<21>d"e<1F>Z!y)#<23>N)<01>gettext)<01>ngettext<78>)<01>get_text_stderr)<01>resolve_color_default)<01>echo)<01>format_filename)<01>Command)<01>Context)<01> Parameter<65>
2025-08-16 19:28:45 +08:00
param_hint<EFBFBD>returnc<00>Z<00>|<00>(t|t<00>sdjd<02>|D<00><00>S|S)Nz / c3<00>2K<00>|]}t|<01><00><01><00>y<00>w<01>N)<01>repr)<02>.0<EFBFBD>xs <20>4D:\aitsc\.venv\Lib\site-packages\click\exceptions.py<70> <genexpr>z$_join_param_hints.<locals>.<genexpr>s<00><00><><00>6<>:<3A>a<EFBFBD>$<24>q<EFBFBD>'<27>:<3A>s<00>)<03>
2025-02-23 09:07:52 +08:00
isinstance<EFBFBD>str<74>join)r s r<00>_join_param_hintsrs.<00><00><12><1D>j<EFBFBD><1A>S<EFBFBD>&A<><14>z<EFBFBD>z<EFBFBD>6<>:<3A>6<>6<>6<> <15><15>c<00><><00><00>eZdZdZdZdeddf<04>fd<06> Zdefd<07>Zdefd<08>Zd d e je je jddfd
<EFBFBD>Z <0A>xZS) <0C>ClickExceptionz8An exception that Click can handle and show to the user.r<00>messagerNc<00>P<00><01>t<00>|<00>|<01>t<00>|_||_yr)<05>super<65>__init__r<00>
show_colorr)<03>selfr<00> __class__s <20>rr!zClickException.__init__s$<00><><00> <0A><07><18><17>!<21>-B<01>,C<><04><0F><1E><04> rc<00><00>|jSr<00>r<00>r#s r<00>format_messagezClickException.format_message&<00> <00><00><13>|<7C>|<7C>rc<00><00>|jSrr&r's r<00>__str__zClickException.__str__)r)r<00>filec<00><><00>|<01>
t<00>}ttd<01>j|j <00><00><02>||j
<00><03>y)N<>Error: {message}r&<00>r,<00>color)rr<00>_<>formatr(r")r#r,s r<00>showzClickException.show,sA<00><00> <0F><<3C>"<22>$<24>D<EFBFBD> <0C> <0A> <20> !<21> (<28> (<28><14>1D<31>1D<31>1F<31> (<28> G<><15><16>/<2F>/<2F>
rr)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F> exit_coderr!r(r+<00>t<>Optional<61>IO<49>Anyr3<00> __classcell__<5F>r$s@rrrs`<00><><00>B<><12>I<EFBFBD><1F><03><1F><04><1F><1C><03><1C><1C><13><1C>
<EFBFBD><11><1A><1A>A<EFBFBD>D<EFBFBD>D<EFBFBD><11><15><15>K<EFBFBD>0<>
<EFBFBD>D<EFBFBD>
rrc<00><><00><00>eZdZdZdZd dedejdddf<06>fd<08> Zd d ejejejddfd
<EFBFBD>Z <0B>xZ S) <0C>
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.
<20>Nr<00>ctxr rc<00><><00><01>t<00>|<00>|<01>||_|jr|jj|_yd|_yr)r r!rB<00>command<6E>cmd)r#rrBr$s <20>rr!zUsageError.__init__Bs4<00><><00> <0A><07><18><17>!<21><16><04><08><@<40>H<EFBFBD>H<EFBFBD><04><08><08>(8<>(8<><04><08>$<24><04>rr,c<00>6<00>|<01>
t<00>}d}d}|j<00>{|jjj|j<00><00>Lt d<02>j |jj |jjd<00><04>}|<03>d<05>}|j<00>A|jj}t|jj<00><00>d|<03><00>||<02><06>tt d<07>j |j<00><00><08>||<02><06>y) N<>z"Try '{command} {option}' for help.r)rD<00>option<6F>
r/r.r&) rrBrD<00>get_help_optionr1r2<00> command_path<74>help_option_namesr0r<00> get_usager()r#r,r0<00>hints rr3zUsageError.showGs<><00><00> <0F><<3C>"<22>$<24>D<EFBFBD><14><05><11><04> <10>H<EFBFBD>H<EFBFBD> <20><14><08><08> <20> <20>0<>0<><14><18><18>:<3A>F<><14>9<>:<3A>A<>A<><1C><08><08>-<2D>-<2D>d<EFBFBD>h<EFBFBD>h<EFBFBD>6P<36>6P<36>QR<51>6S<36>B<01><0E>D<EFBFBD><1B>V<EFBFBD>2<EFBFBD>;<3B>D<EFBFBD> <0F>8<EFBFBD>8<EFBFBD> <1F><18>H<EFBFBD>H<EFBFBD>N<EFBFBD>N<EFBFBD>E<EFBFBD> <10>D<EFBFBD>H<EFBFBD>H<EFBFBD>&<26>&<26>(<28>)<29><12>D<EFBFBD>6<EFBFBD>2<><14>U<EFBFBD> K<> <0C> <0A> <20> !<21> (<28> (<28><14>1D<31>1D<31>1F<31> (<28> G<><15><17>
rr) r4r5r6r7r8rr9r:r!r;r<r3r=r>s@rr@r@7s^<00><><00><08><12>I<EFBFBD>O<01><03>O<01>!<21>*<2A>*<2A>Y<EFBFBD>*?<3F>O<01>4<EFBFBD>O<01>

<EFBFBD><11><1A><1A>A<EFBFBD>D<EFBFBD>D<EFBFBD><11><15><15>K<EFBFBD>0<>
<EFBFBD>D<EFBFBD>
rr@c <00><><00><00>eZdZdZ d dedej ddej ddej ed df
<EFBFBD>fd
<EFBFBD> Zd efd <0B>Z<08>xZ S) <0A> 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.
NrrBr <00>paramr r rc<00>B<00><01>t<00>|<00>||<02>||_||_yr)r r!rQr )r#rrBrQr r$s <20>rr!zBadParameter.__init__ps"<00><><00> <0E><07><18><17>#<23>&<26><1A><04>
<EFBFBD>$<24><04>rc<00>@<00>|j<00> |j}nW|j<00>&|jj|j<00>}n%t d<01>j |j <00><02>St d<03>j t|<01>|j <00><04>S)NzInvalid value: {message}r&z)Invalid value for {param_hint}: {message})r r)r rQ<00>get_error_hintrBr1r2rr)r#r s rr(zBadParameter.format_message{s<><00><00> <0F>?<3F>?<3F> &<26><1D><1F><1F>J<EFBFBD> <11>Z<EFBFBD>Z<EFBFBD> #<23><1D><1A><1A>2<>2<>4<EFBFBD>8<EFBFBD>8<EFBFBD><<3C>J<EFBFBD><14>/<2F>0<>7<>7<><04> <0C> <0C>7<>M<> M<><10><<3C>=<3D>D<>D<>(<28><1A>4<>d<EFBFBD>l<EFBFBD>l<EFBFBD>E<01>
<EFBFBD>
r<00>NNN<4E>
r4r5r6r7rr9r:r!r(r=r>s@rrPrP^sn<00><><00><08>(&*<2A>)-<2D>&*<2A> %<25><14> %<25><0F>Z<EFBFBD>Z<EFBFBD> <09> "<22> %<25><11>z<EFBFBD>z<EFBFBD>+<2B>&<26> %<25>
<16>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD> %<25>
<0E> %<25>

<EFBFBD><03>

rrPc <00><><00><00>eZdZdZ ddej
edej
ddej
ddej
ed ej
ed
df <0C>fd <0B> Zd
efd <0C>Zd
efd <0A>Z <09>xZ
S)<0F>MissingParametera<72>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'``.
NrrBr rQr r <00>
param_typerc<00>@<00><01>t<00>|<00>|xsd|||<04>||_y)NrG)r r!rY)r#rrBrQr rYr$s <20>rr!zMissingParameter.__init__<5F>s#<00><><00> <0E><07><18><17><1D>B<EFBFBD><03>U<EFBFBD>J<EFBFBD>?<3F>$<24><04>rc<00><><00>|j<00> |j}n4|j<00>&|jj|j<00>}nd}t |<01>}|rd|<01><00>nd}|j
}|<02>"|j<00>|jj }|j}|j<00>>|jjj|j<00>}|r |r |d|<04><00>z }n|}|rd|<03><00>nd}|dk(r td<05>}n=|dk(r td<07>}n,|dk(r td <09>}ntd
<EFBFBD>j|<02> <0B>}|<05>|<01>d |<03><00>S) N<> rGz. <20>argumentzMissing argumentrHzMissing option<6F> parameterzMissing parameterzMissing {param_type})rY<00>.) r rQrTrBrrY<00>param_type_namer<00>type<70>get_missing_messager1r2)r#r rY<00>msg<73> msg_extra<72>missings rr(zMissingParameter.format_message<67>s@<00><00> <0F>?<3F>?<3F> &<26>*.<2E>/<2F>/<2F>J<EFBFBD> <11>Z<EFBFBD>Z<EFBFBD> #<23><1D><1A><1A>2<>2<>4<EFBFBD>8<EFBFBD>8<EFBFBD><<3C>J<EFBFBD><1D>J<EFBFBD>&<26>z<EFBFBD>2<>
<EFBFBD>)3<>q<EFBFBD><1A> <0C>%<25><12>
<EFBFBD><19>_<EFBFBD>_<EFBFBD>
<EFBFBD> <15> <1D>$<24>*<2A>*<2A>"8<><1D><1A><1A>3<>3<>J<EFBFBD><12>l<EFBFBD>l<EFBFBD><03> <0F>:<3A>:<3A> !<21><1C>
<EFBFBD>
<EFBFBD><0F><0F>;<3B>;<3B>D<EFBFBD>J<EFBFBD>J<EFBFBD>G<>I<EFBFBD><18><16><17>R<EFBFBD> <09>{<7B>+<2B>+<2B>C<EFBFBD>#<23>C<EFBFBD><1E><01>#<23><15>i<EFBFBD>B<EFBFBD><03> <16><1A> #<23><17>*<2A>+<2B>G<EFBFBD> <17>8<EFBFBD> #<23><17>(<28>)<29>G<EFBFBD> <17>;<3B> &<26><17>+<2B>,<2C>G<EFBFBD><17>.<2E>/<2F>6<>6<>*<2A>6<>M<>G<EFBFBD><19><19>:<3A>,<2C>a<EFBFBD><03>u<EFBFBD>-<2D>-rc<00><><00>|js?|jr|jjnd}td<01>j |<01><02>S|jS)NzMissing parameter: {param_name})<01>
param_name)rrQ<00>namer1r2)r#rgs rr+zMissingParameter.__str__<5F>sB<00><00><13>|<7C>|<7C>,0<>J<EFBFBD>J<EFBFBD><14><1A><1A><1F><1F>D<EFBFBD>J<EFBFBD><14>6<>7<>><3E>><3E>*<2A>><3E>U<> U<><17><<3C><<3C> r)NNNNN) r4r5r6r7r9r:rr!r(r+r=r>s@rrXrX<00>s<><00><><00> <08>$(<28>%)<29>)-<2D>&*<2A>&*<2A> %<25><12><1A><1A>C<EFBFBD><1F> %<25><0F>Z<EFBFBD>Z<EFBFBD> <09> "<22> %<25><11>z<EFBFBD>z<EFBFBD>+<2B>&<26> %<25>
<16>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD> %<25> <16>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD> %<25>
<0E> %<25>$.<2E><03>$.<2E>L <20><13> rrXc <00><><00><00>eZdZdZ d dedej edej ejedej dddf
<EFBFBD>fd <09> Zdefd
<EFBFBD>Z <09>xZ
S) <0C> NoSuchOptionzfRaised if click attempted to handle an option that does not
exist.
.. versionadded:: 4.0
N<> option_namer<00> possibilitiesrBr rc<00>|<00><01>|<02>td<01>j|<01><02>}t<00>|<00> ||<04>||_||_y)NzNo such option: {name})rh)r1r2r r!rkrl)r#rkrrlrBr$s <20>rr!zNoSuchOption.__init__<5F>sB<00><><00> <13>?<3F><17>0<>1<>8<>8<>k<EFBFBD>8<>J<>G<EFBFBD> <0A><07><18><17>#<23>&<26>&<26><04><18>*<2A><04>rc<00><><00>|js |jSdjt|j<00><00>}t ddt |j<00><00>j ||<01><04>}|j<00>d|<02><00>S)Nz, zDid you mean {possibility}?z#(Possible options: {possibilities}))<02> possibilityrlr\)rlrr<00>sortedr<00>lenr2)r#<00>possibility_str<74>suggests rr(zNoSuchOption.format_message<67>sv<00><00><13>!<21>!<21><17><<3C><<3C> <1F><1E>)<29>)<29>F<EFBFBD>4<EFBFBD>+=<3D>+=<3D>$><3E>?<3F><0F><1A> )<29> 1<> <0F><04>"<22>"<22> #<23>
<EFBFBD> <11>&<26>_<EFBFBD>O<EFBFBD>&<26>
L<EFBFBD> <10>
<17>,<2C>,<2C><1E>q<EFBFBD><17> <09>*<2A>*rrU) r4r5r6r7rr9r:<00>Sequencer!r(r=r>s@rrjrj<00>sv<00><><00><08>$(<28>59<35>%)<29> +<2B><18> +<2B><13><1A><1A>C<EFBFBD><1F> +<2B><19>z<EFBFBD>z<EFBFBD>!<21>*<2A>*<2A>S<EFBFBD>/<2F>2<> +<2B>
<0F>Z<EFBFBD>Z<EFBFBD> <09> "<22> +<2B>
<0E> +<2B>
+<2B><03>
+rrjc <00>R<00><00>eZdZdZ d dededej dddf<08>fd<08> Z<07>xZS)
<EFBFBD>BadOptionUsageaRaised if an option is generally supplied but the use of the option
was incorrect. This is for instance raised if the number of arguments
for an option is not correct.
.. versionadded:: 4.0
:param option_name: the name of the option being used incorrectly.
NrkrrBr rc<00>4<00><01>t<00>|<00>||<03>||_yr)r r!rk)r#rkrrBr$s <20>rr!zBadOptionUsage.__init__<5F>s<00><><00> <0E><07><18><17>#<23>&<26>&<26><04>rr) r4r5r6r7rr9r:r!r=r>s@rrvrv<00>sB<00><><00><08>LP<01>'<27><1E>'<27>),<2C>'<27>34<33>:<3A>:<3A>i<EFBFBD>3H<33>'<27> <0A>'<27>'rrvc<00><00>eZdZdZy)<03>BadArgumentUsagez<65>Raised if an argument is generally supplied but the use of the argument
was incorrect. This is for instance raised if the number of values
for an argument is not correct.
.. versionadded:: 6.0
N<>r4r5r6r7<00>rrryrys<00><00>rryc<00>X<00><00>eZdZdZddedej eddf<06>fd<06> Zdefd<07>Z<08>xZ S) <09> FileErrorz"Raised if a file cannot be opened.N<>filenamerNrc<00>l<00><01>|<02> td<01>}t<00>|<00> |<02>t|<01>|_||_y)Nz unknown error)r1r r!r <00> ui_filenamer~)r#r~rNr$s <20>rr!zFileError.__init__ s3<00><><00> <0F><<3C><14>_<EFBFBD>%<25>D<EFBFBD> <0A><07><18><14><1E> /<2F><08> 9<><04><18> <20><04> rc<00>b<00>td<01>j|j|j<00><02>S)Nz+Could not open file {filename!r}: {message})r~r)r1r2r<>rr's rr(zFileError.format_messages0<00><00><10>><3E>?<3F>F<>F<><19>%<25>%<25>t<EFBFBD>|<7C>|<7C>G<01>
<EFBFBD>
rrrVr>s@rr}r} s4<00><><00>,<2C>!<21><13>!<21>A<EFBFBD>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD>!<21>t<EFBFBD>!<21>
<EFBFBD><03>
rr}c<00><00>eZdZdZy)<03>Abortz=An internal signalling exception that signals Click to abort.Nrzr{rrr<>r<>s<00><00>Grr<>c<00>&<00>eZdZdZdZddeddfd<06>Zy)<08>Exitz<74>An exception that indicates that the application should exit with some
status code.
:param code: the status code to exit with.
<20>r8<00>coderNc<00><00>||_yrr<>)r#r<>s rr!z Exit.__init__'s <00><00>"<22><04>r)r)r4r5r6r7<00> __slots__<5F>intr!r{rrr<>r<>s!<00><00><08> <1F>I<EFBFBD>#<23>S<EFBFBD>#<23><14>#rr<>)"<22>typingr9rr1r<00>_compatr<00>globalsr<00>utilsrr <00> TYPE_CHECKING<4E>corer
r r r:<00>Unionrtrr<00> Exceptionrr@rPrXrjrvryr}<00> RuntimeErrorr<72>r<>r{rr<00><module>r<>s<><00><01><12> <20><1C>$<24>*<2A><17>"<22><04>?<3F>?<3F><1D><1D><1F><16><11>
<EFBFBD>
<EFBFBD>1<EFBFBD>7<EFBFBD>7<EFBFBD>1<EFBFBD>:<3A>:<3A>c<EFBFBD>?<3F>C<EFBFBD>#7<>8<>9<><16><06>Z<EFBFBD>Z<EFBFBD><03>_<EFBFBD><16>
<EFBFBD>Y<EFBFBD>
<EFBFBD><$
<EFBFBD><1E>$
<EFBFBD>N'
<EFBFBD>:<3A>'
<EFBFBD>TB <20>|<7C>B <20>J+<2B>:<3A>+<2B>D'<27>Z<EFBFBD>'<27>"<08>z<EFBFBD><08>
<EFBFBD><0E>
<EFBFBD>"H<01>L<EFBFBD>H<01>
#<23><<3C>
#r