}tddlZddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z ddl m Z dd lmZdd lmZdd lmZejrddlZdd lmZdd lmZddlmZGddZGddeZGddeZGddeZGddeZGddeZGddeZ GddeZ!Gdd e!Z"Gd!d"e!Z#Gd#d$e"e#Z$Gd%d&e!Z%Gd'd(e"e%Z&Gd)d*eZ'Gd+d,eZ(Gd-d.eZ)d/ej*d0d1fd2Z+Gd3d4eZ,Gd5d6eZ-d:d7ej.ej*d8ej.ej*d0efd9Z/eZ0eZ1e#Z2e%Z3e'Z4e(Z5dS);N)datetime)gettext)ngettext)_get_argv_encoding) open_stream BadParameter)format_filename)LazyFile)safecall)Context) ParameterCompletionItemc peZdZUdZdZejeed<dZ eje ed<e ed<dZ ejej e ed<d eje ejffd Z dd ejd ej d dej dd ejfdZd d d ej e fdZd d d ej e fdZd ejd ej d dej dd ejfdZde d eje fdZ dde d ej d dej dd dfdZddd d de d ejdfdZdS) ParamTypeaRepresents the type of a parameter. Validates and converts values from the command line or Python into the correct type. To implement a custom type, subclass and implement at least the following: - The :attr:`name` class attribute must be set. - Calling an instance of the type with ``None`` must return ``None``. This is already implemented by default. - :meth:`convert` must convert string values to the correct type. - :meth:`convert` must accept values that are already the correct type. - It must be able to convert a value if the ``ctx`` and ``param`` arguments are ``None``. This can occur when converting prompt input. F is_compositeraritynameNenvvar_list_splitterreturnct|jdd}|dd}t|dr|j}n|}||dS)zGather information that could be useful for a tool generating user-facing documentation. Use :meth:`click.Context.to_info_dict` to traverse the entire CLI structure. .. versionadded:: 8.0 rr ParameterTyper) param_typer)type__name__ partitionhasattrr)selfrrs k/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/click/types.py to_info_dictzParamType.to_info_dict7sm$ZZ(22;??B ))/::1=  4  9DDD($777valueparamrctxrc8|||||SdSN)convertr r$r%r&s r!__call__zParamType.__call__Ls(  <<uc22 2  r#cdS)z>Returns the metavar default for this param if it provides one.Nr r%s r! get_metavarzParamType.get_metavarUr#cdS)ztOptionally might return extra information about a missing parameter. .. versionadded:: 2.0 Nr-r.s r!get_missing_messagezParamType.get_missing_messageXr0r#c|S)aConvert the value to the correct type. This is not called if the value is ``None`` (the missing value). This must accept string values from the command line, as well as values that are already the correct type. It may also convert other compatible types. The ``param`` and ``ctx`` arguments may be ``None`` in certain situations, such as when converting prompt input. If the value cannot be converted, call :meth:`fail` with a descriptive message. :param value: The value to convert. :param param: The parameter that is using this type to convert its value. May be ``None``. :param ctx: The current context that arrived at this value. May be ``None``. r-r*s r!r)zParamType.convert_s , r#rvc:|pd|jS)auGiven a value from an environment variable this splits it up into small chunks depending on the defined envvar list splitter. If the splitter is set to `None`, which means that whitespace splits, then leading and trailing whitespace is ignored. Otherwise, leading and trailing splitters usually lead to empty items being included. )splitr)r r4s r!split_envvar_valuezParamType.split_envvar_valuewsb 9:::r#messagez t.NoReturnc&t|||)z4Helper method to fail with an invalid value message.)r&r%r )r r9r%r&s r!failzParamType.fails759999r# incompletercgS)aReturn a list of :class:`~click.shell_completion.CompletionItem` objects for the incomplete value. Most types do not provide completions, but some do, and this allows custom types to provide custom completions as well. :param ctx: Invocation context for this command. :param param: The parameter that is requesting completion. :param incomplete: Value being completed. May be empty. .. versionadded:: 8.0 r-)r r&r%r<s r!shell_completezParamType.shell_completes  r#)NN)r __module__ __qualname____doc__rtClassVarbool__annotations__rintstrrOptionalDictAnyr"r+r/r2r)Sequencer8r;Listr>r-r#r!rrsP"&+L!*T"***E1:c? III9=!*QZ_5<<<8afS!%Z088880*.%) 33u3z+&3Z " 3  3333MMCMMMM  C    U#$:k#:ABIAV 0;S;QZ_;;;;*.%) :::z+&:Z " :  ::::%0>A  !r#rc.eZdZdZedefdZdS)CompositeParamTypeTrctr(NotImplementedErrorr s r!rzCompositeParamType.aritys!###r#N)rr?r@rpropertyrFrr-r#r!rNrNs>L $s$$$X$$$r#rNceZdZdejejgejfddfdZdejeejfffd Z dejdej dd ej d dejfd Z xZ S) FuncParamTypefuncrNc,|j|_||_dSr()rrrV)r rVs r!__init__zFuncParamType.__init__s  r#c\t}|j|d<|S)NrV)superr"rVr info_dict __class__s r!r"zFuncParamType.to_info_dicts*GG((**  I &r#r$r%rr&rc ||S#t$rR t|}n&#t$r|dd}YnwxYw||||YdSwxYwNzutf-8replace)rV ValueErrorrG UnicodeErrordecoder;r*s r!r)zFuncParamType.converts )99U## # ) ) ) 9E  9 9 9 Wi88 9 IIeUC ( ( ( ( ( (  )s/ A32A3 AA3AA32A3) rr?r@rBCallablerJrXrIrGr"rHr) __classcell__r]s@r!rUrUsQZ7DafS!%Z0 )U )#$:k#: )ABIAV )  ) ) ) ) ) ) ) )r#rUcveZdZdZdejdejddejddejfdZdefd Z d S) UnprocessedParamTypetextr$r%rr&rrc|Sr(r-r*s r!r)zUnprocessedParamType.converts  r#cdS)N UNPROCESSEDr-rRs r!__repr__zUnprocessedParamType.__repr__s}r#N rr?r@rrBrJrHr)rGrmr-r#r!rhrhsz DU#$:k#:ABIAV  #r#rhcveZdZdZdejdejddejddejfdZdefd Z d S) StringParamTyperir$r%rr&rrct|trt} ||}n|#t$rot j}||kr= ||}n<#t$r|dd}YnwxYw|dd}YnwxYw|St|Sr_) isinstancebytesrrcrbsysgetfilesystemencodingrG)r r$r%r&encfs_encs r!r)zStringParamType.converts eU # # $&&C = S)) = = =244S==A % V 4 4'AAA % Wi @ @A"LL)<The choice type allows a value to be checked against a fixed set of supported values. All of these values have to be strings. You should only pass a list or tuple of choices. Other iterables (like generators) may lead to surprising results. The resulting value will always be one of the originally passed choices regardless of ``case_sensitive`` or any ``ctx.token_normalize_func`` being specified. See :ref:`choice-opts` for an example. :param case_sensitive: Set to false to make choices case insensitive. Defaults to true. choiceTchoicescase_sensitiverNc"||_||_dSr()r}r~)r r}r~s r!rXzChoice.__init__s ,r#cpt}|j|d<|j|d<|S)Nr}r~)rZr"r}r~r[s r!r"zChoice.to_info_dicts8GG((** #| )&*&9 "#r#r%rcrd|j}|jr|jdkrd|dSd|dS)N|argument{}[])joinr}requiredparam_type_name)r r% choices_strs r!r/zChoice.get_metavarsRhht|,,  > (e3zAA' ''' '";!!!!r#cxtdd|jS)NzChoose from: {choices}z, )r})_formatrr}r.s r!r2zChoice.get_missing_message s0,--44W\\$,=W=W4XXXr#r$r&rc *|}d|jD}<j5|}fd|D}|js2|}d|D}||vr||Sdt t|j}|tddt|j ||||dS)Nci|]}||Sr-r-).0r|s r! z"Choice.convert..sDDDV&&DDDr#cBi|]\}}||Sr-)token_normalize_func)r normed_choiceoriginalr&s r!rz"Choice.convert..s=+M8((77r#c>i|]\}}||Sr-)casefold)rrrs r!rz"Choice.convert..s:+M8&&(((r#, z{value!r} is not {choice}.z"{value!r} is not one of {choices}.)r$r|r}) r}ritemsr~rrmapreprr;rlenr)r r$r%r& normed_valuenormed_choicesrs ` r!r)zChoice.convert sK DDt|DDD ?s7C33E::L/=/C/C/E/EN " '0022L/=/C/C/E/EN > ) )!,/ /iiD$, 7 788  ,4DL!!  f5kfJJ       r#c2dt|jdS)NzChoice())listr}rRs r!rmzChoice.__repr__2s.dl++....r#r<rcddlmtt|j}|jrfd|D}n"fd|D}fd|DS)aComplete choices that start with the incomplete value. :param ctx: Invocation context for this command. :param param: The parameter that is requesting completion. :param incomplete: Value being completed. May be empty. .. versionadded:: 8.0 rrc3FK|]}||VdSr() startswithrcr<s r! z(Choice.shell_complete..Es4JJQj1I1IJqJJJJJJr#c3jK|]-}|)|V.dSr()lowerrrs r!rz(Choice.shell_complete..Hs>RRQ1E1Ej1Q1QRqRRRRRRr#c&g|] }|Sr-r-)rrrs r! z)Choice.shell_complete..Js#333aq!!333r#)click.shell_completionrrrGr}r~r)r r&r%r< str_choicesmatchedrs ` @r!r>zChoice.shell_complete5s :99999#t|,,   SJJJJ+JJJGG#))++JRRRR+RRRG333373333r#)T)rr?r@rArrBrKrGrDrXrIrJr"r/r2rHr)rmrLr>rerfs@r!r{r{s D-- 3--QU----afS!%Z0 """"""YYYYYY$ U$ #$:k#:$ ABIAV$ $ $ $ $ L/#////44%04>A4  !44444444r#r{c2eZdZdZdZddejejefdZ dej eej fffd Z dd defd Z d ej d edejefd Zd ej dejd dejddej fdZdefdZxZS)DateTimeaKThe DateTime type converts date strings into `datetime` objects. The format strings which are checked are configurable, but default to some common (non-timezone aware) ISO 8601 formats. When specifying *DateTime* formats, you should only pass a list or a tuple. Other iterables, like generators, may lead to surprising results. The format strings are processed using ``datetime.strptime``, and this consequently defines the format strings which are allowed. Parsing is tried using each format, in order, and the first format which parses successfully is used. :param formats: A list or tuple of date format strings, in the order in which they should be tried. Defaults to ``'%Y-%m-%d'``, ``'%Y-%m-%dT%H:%M:%S'``, ``'%Y-%m-%d %H:%M:%S'``. rNformatsc|pgd|_dS)N)z%Y-%m-%dz%Y-%m-%dT%H:%M:%Sz%Y-%m-%d %H:%M:%S)r)r rs r!rXzDateTime.__init__ds!(/) 4 4 4  r#rc\t}|j|d<|S)Nr)rZr"rr[s r!r"zDateTime.to_info_dictks*GG((** #| )r#r%rc>dd|jdS)Nrrr)rrr.s r!r/zDateTime.get_metavarps!,388DL)),,,,r#r$rcP tj||S#t$rYdSwxYwr()rstrptimera)r r$rs r!_try_to_convert_datezDateTime._try_to_convert_datess< $UF33 3   44 s  %%r&rc vt|tr|S|jD]}|||}||cSdt t |j}|tddt|j |||||dS)Nrz-{value!r} does not match the format {format}.z/{value!r} does not match the formats {formats}.)r$rr) rrrrrrrrr;rrr)r r$r%r&r converted formats_strs r!r)zDateTime.convertys eX & & Ll ! !F11%@@I$    %iiD$, 7 788  ?ADL!!  f5kfJJ       r#cdS)Nrr-rRs r!rmzDateTime.__repr__szr#r()rr?r@rArrBrHrKrGrXrIrJr"r/rrr)rmrerfs@r!rrMsD( D   1:c? ;    afS!%Z0 ------!%HAU  U #$:k#: ABIAV     .#r#rceZdZUejejejed<dejdejddejddejfdZ d S) _NumberParamTypeBase _number_classr$r%rr&rrc ||S#t$rB|td||j||YdSwxYw)Nz'{value!r} is not a valid {number_type}.)r$ number_type)rrar;rrrr*s r!r)z_NumberParamTypeBase.converts %%e,, ,    II;<<CCTYD        sAA#"A#N) rr?r@rBrCTyperJrErHr)r-r#r!rrsw:afQUm,,,, U #$:k#: ABIAV        r#rc ,eZdZ ddejedejededededdf d Zdeje ej fffd Z d ej d ejd dejddej ffd Z dedddedefdZ de fdZde fdZxZS)_NumberRangeBaseNFminmaxmin_openmax_openclamprcL||_||_||_||_||_dSr(rrrrr)r rrrrrs r!rXz_NumberRangeBase.__init__s+     r#ct}||j|j|j|j|j|S)Nr)rZr"updaterrrrrr[s r!r"z_NumberRangeBase.to_info_dictsVGG((** ]]*    r#r$r%rr&rcBddl}t|||}|jduo#|jr|jn|j||j}|jduo#|jr|j n|j ||j}|j rF|r!| |jd|jS|r!| |jd|jS|s|rK| td|||||S)Nrrz${value} is not in the range {range}.)r$range)operatorrZr)rrleltrrgegtr_clampr;rr_describe_range) r r$r%r&rr4lt_mingt_maxr]s r!r)z_NumberRangeBase.convertsN  WW__UE3 / /xt+ 94= 9HKKhk dh11xt+ 94= 9HKKhk dh11 : @ ?{{48Q >>> @{{48R???  V  II899@@D$8$8$:$:A     r#bounddirte.Literal[1, -1]openct)zFind the valid value to clamp to bound in the given direction. :param bound: The boundary value. :param dir: 1 or -1 indicating the direction to move. :param open: If true, the range does not include the bound. rPr rrrs r!rz_NumberRangeBase._clamps "!r#c|j|jrdnd}d||jS|j|jrdnd}d||jS|jrdnd}|jrdnd}|j|d||jS)z(Describe the range for use in help text.Nz>=)rrrr)r oploprops r!rz _NumberRangeBase._describe_ranges 8  /4B%r%48%% % 8  /4B%r%48%% %],cc],cc(1C11#1tx111r#cv|jrdnd}dt|jd||dS)Nz clampedr6r r)rrrr)r rs r!rmz_NumberRangeBase.__repr__sE"j0 bI4::&II)=)=)?)?IIIIIr#NNFFF)rr?r@rBrHfloatrDrXrIrGrJr"r)rrrmrerfs@r!rrs"&!%   Z  Z             afS!%Z0      U#$:k#:ABIAV >"E"(;"4"E"""" 2 2 2 2 2J#JJJJJJJJr#rc"eZdZdZeZdefdZdS) IntParamTypeintegerrcdS)NINTr-rRs r!rmzIntParamType.__repr__sur#N)rr?r@rrFrrGrmr-r#r!rrs9 DM#r#rc.eZdZdZdZdedddedefdZd S) IntRangeaRestrict an :data:`click.INT` value to a range of accepted values. See :ref:`ranges`. If ``min`` or ``max`` are not passed, any value is accepted in that direction. If ``min_open`` or ``max_open`` are enabled, the corresponding boundary is not included in the range. If ``clamp`` is enabled, a value outside the range is clamped to the boundary instead of failing. .. versionchanged:: 8.0 Added the ``min_open`` and ``max_open`` parameters. z integer rangerrrrrc|s|S||zSr(r-rs r!rzIntRange._clamps Ls{r#N)rr?r@rArrFrDrr-r#r!rrsY   D2:> r#rc"eZdZdZeZdefdZdS)FloatParamTyperrcdS)NFLOATr-rRs r!rmzFloatParamType.__repr__"swr#N)rr?r@rrrrGrmr-r#r!rrs9 DM#r#rc eZdZdZdZ ddejedejededed ed df fd Z d ed dded efdZ xZ S) FloatRangea&Restrict a :data:`click.FLOAT` value to a range of accepted values. See :ref:`ranges`. If ``min`` or ``max`` are not passed, any value is accepted in that direction. If ``min_open`` or ``max_open`` are enabled, the corresponding boundary is not included in the range. If ``clamp`` is enabled, a value outside the range is clamped to the boundary instead of failing. This is not supported if either boundary is marked ``open``. .. versionchanged:: 8.0 Added the ``min_open`` and ``max_open`` parameters. z float rangeNFrrrrrrct||||||s|r|rtddSdS)Nr*Clamping is not supported for open bounds.)rZrX TypeError)r rrrrrr]s r!rXzFloatRange.__init__8ss x(%      J Je JHII I J J J Jr#rrrrc(|s|Std)Nr) RuntimeErrorrs r!rzFloatRange._clampGs  L GHHHr#r) rr?r@rArrBrHrrDrXrrerfs@r!rr&s   D"&!% J J Z  JZ  J J  J  J  J J J J J JIEI(;I4IEIIIIIIIIr#rcveZdZdZdejdejddejddejfdZdefd Z d S) BoolParamTypebooleanr$r%rr&rrc|dvrt|S|}|dvrdS|dvrdS|t d|||dS)N>FT>1rByonyestrueT>0fnnoofffalseFz!{value!r} is not a valid boolean.r$)rDstriprr;rr)r r$r%r&norms r!r)zBoolParamType.convertTs M ! !;; {{}}""$$ 7 7 74 8 8 85 1 2 2 9 9 9 F Fs     r#cdS)NBOOLr-rRs r!rmzBoolParamType.__repr__fvr#Nrnr-r#r!rrQsz D U #$:k#: ABIAV     $#r#rcveZdZdZdejdejddejddejfdZdefd Z d S) UUIDParameterTypeuuidr$r%rr&rrcddl}t||jr|S|} ||S#t$r<|t d|||YdSwxYw)Nrz{value!r} is not a valid UUID.r )rrrUUIDrrar;rr)r r$r%r&rs r!r)zUUIDParameterType.convertms  eTY ' ' L  99U## #    II233:::GGPS       sAAB  B cdS)Nrr-rRs r!rmzUUIDParameterType.__repr__~rr#Nrnr-r#r!rrjsz DU#$:k#:ABIAV "#r#rc eZdZUdZdZejjZe j e e d< dde d e j e d e j e d e j ed ed df dZd e je e jfffd Zddd efdZde je de je jfde j dde j dd e je jfdZddddde d e jdfdZxZS)FileaDeclares a parameter to be a file for reading or writing. The file is automatically closed once the context tears down (after the command finished working). Files can be opened for reading or writing. The special value ``-`` indicates stdin or stdout depending on the mode. By default, the file is opened for reading text data, but it can also be opened in binary mode or for writing. The encoding parameter can be used to force a specific encoding. The `lazy` flag controls if the file should be opened immediately or upon first IO. The default is to be non-lazy for standard input and output streams as well as files opened for reading, `lazy` otherwise. When opening a file lazily for reading, it is still opened temporarily for validation, but will not be held open until first IO. lazy is mainly useful when opening for writing to avoid creating the file until it is needed. Starting with Click 2.0, files can also be opened atomically in which case all writes go into a separate file in the same folder and upon completion the file will be moved over to the original location. This is useful if a file regularly read by other users is modified. See :ref:`file-args` for more information. filenamerrNstrictFmodeencodingerrorslazyatomicrcL||_||_||_||_||_dSr()rrr r!r")r rrr r!r"s r!rXz File.__init__s+      r#ct}||j|j|S)N)rr)rZr"rrrr[s r!r"zFile.to_info_dicts;GG((** di$-@@@r#r$t.Union[str, os.PathLike[str]]cl|j|jStj|dkrdSd|jvrdSdS)N-FwT)r!osfspathrr r$s r!resolve_lazy_flagzFile.resolve_lazy_flagsC 9 9  9U  s " "5 DI  4ur#os.PathLike[str]r%rr&rct|r|Stjd|} ||}|rst ||j|j|j|j}|| |j tjtj tj |St||j|j|j|j\}}|Q|r(| t|jn'| t|j|S#t"$r:}|dt'|d|j||Yd}~dSd}~wwxYw)Nr%)r"'z': ) _is_file_likerBcastr,r rrr r" call_on_closeclose_intelligentlyIOrJrr closeflushOSErrorr;r strerror) r r$r%r&r!lfr should_closees r!r)z File.converts    L7?? O))%00D /49dmT[?%%b&<===vad15k2...)ty$-T[OA|9%%hqw&7&78888%%hqw&7&7888H O O O IIA/%00AAQZAA5# N N N N N N N N N OsB D22A?D22 E6zFile.shell_completes. :99999z77788r#)rNrNF)rr?r@rArr)pathpathseprrBrCrGrErHrDrXrIrJr"r,Unionr4r)rLr>rerfs@r!rrs4 D,.GO!*S/;;;$("*!%   *S/  3  j        afS!%Z0 'GD)Ows.QU ;<)Oz+&)OZ " )O ae )O)O)O)OV99%09>A9  !99999999r#rr$rzte.TypeGuard[t.IO[t.Any]]cBt|dpt|dS)Nreadwrite)rr s r!r0r0s! 5& ! !  "$- "vYYDIII ] "4> "+DIII& DIIIr#rct}||j|j|j|j|j|j|S)N)rGrHrIrJrKrM) rZr"rrGrHrIrJrKrMr[s r!r"zPath.to_info_dict<s[GG((** ;n]]]    r#r$r%%t.Union[str, bytes, os.PathLike[str]]c|jt||jsl|jturtj|S|jt urtj|Stjd||S|S)Nr-) rrrrGr)fsdecodersfsencoderBr1r+s r!coerce_path_resultzPath.coerce_path_resultHs{ 9 E49)E)E yC{5)))e##{5)))v0$))E2B2BCCC r#r%rr&rc *|}|jo |jo|dv}|sh|jr=ddl}t j||} t j|}n#t$r~|j s| |cYS| td|jt#|||YnwxYw|jsvtj|jr]| td|jt#||||jsvtj|jr]| td|jt#||||jr|t j|tjs]| td|jt#||||jr|t j|tjs]| td|jt#||||jr|t j|tjs]| td |jt#|||| |S) N)-r'rz#{name} {filename!r} does not exist.)rrz{name} {filename!r} is a file.z#{name} '{filename}' is a directory.z${name} {filename!r} is not readable.z${name} {filename!r} is not writable.z&{name} {filename!r} is not executable.)rHrMrLpathlibr)rUrFresolvestatr7rGrWr;rrrtitler S_ISREGst_moderIS_ISDIRrKaccessR_OKrJW_OKrOX_OK)r r$r%r&r4is_dashrZsts r!r)z Path.convertUs .JT_J{9J?   =[b!1!1!9!9!;!;<< WR[[   {722266666 ;<<CC!Y__..9O9OD  > dl2:&>&>  677>>!Y__..9O9O? = T\"*%=%=  ;<<CC!Y__..9O9OD } RYr27%;%;  <==DD!Y__..9O9OE } RYr27%;%;  <==DD!Y__..9O9OE  ry'@'@  >??FF!Y__..9O9OG &&r***sA22&C:AC:9C:r<rcNddlm}|jr |jsdnd}|||gS)aReturn a special completion marker that tells the completion system to use the shell to provide path completions for only directories or any paths. :param ctx: Invocation context for this command. :param param: The parameter that is requesting completion. :param incomplete: Value being completed. May be empty. .. versionadded:: 8.0 rrrr=r>)rrrIrH)r r&r%r<rrs r!r>zPath.shell_completesE :99999 HdnHuu&z55566r#) FTTFTFFNF)r$r%rrS)rr?r@rAr)r?r@rrBrCrGrErDrHrrJrXrIr"rWr)rLr>rerfs@r!rFrFs@-/GO!*S/;;;" /3 """" "  "  """:afQUm,""""": afS!%Z0       5  0    K+/K+z+&K+Z " K+ 1 K+K+K+K+Z77%07>A7  !77777777r#rFc<eZdZdZdejejejeje fddfdZ dej e ejfffd Z ede fdZedefdZd ejd ejd d ejd dejfdZxZS)TupleaThe default behavior of Click is to apply a type on a value directly. This works well in most cases, except for when `nargs` is set to a fixed count and different types should be used for different items. In this case the :class:`Tuple` type can be used. This type can only be used if `nargs` is set to a fixed number. For more information see :ref:`tuple-type`. This can be selected by using a Python tuple literal as a type. :param types: a list of types that should be used for the tuple items. typesrNc(d|D|_dS)Nc,g|]}t|Sr-) convert_typertys r!rz"Tuple.__init__..s ,N,N,N"\"-=-=,N,N,Nr#)rj)r rjs r!rXzTuple.__init__s,N,N,N,N,N r#cpt}d|jD|d<|S)Nc,g|]}|jSr-)r")rrBs r!rz&Tuple.to_info_dict..s"CCC1nan..CCCr#rj)rZr"rjr[s r!r"zTuple.to_info_dicts8GG((** CC CCC 'r#cRddd|jDdS)Nrrc3$K|] }|jV dSr()rrns r!rzTuple.name..s$99BG999999r#r)rrjrRs r!rz Tuple.names0<38899dj99999<<<.s5KK52qRR5#&&KKKKKKr#)rrjr;rrtuplezip)r r$r%r&rvrws `` r!r)z Tuple.convertstz??JJ  IIPQ&(i&@@    KKKKKC E4J4JKKKKKKr#)rr?r@rArBrKrArrJrrXrIrGr"rSrrFrrHr)rerfs@r!riris?  Oaj 1I)JKOPTOOOOafS!%Z0 =c===X=sXLUL#$:k#:LABIAVL LLLLLLLLr#rirodefaultcd}||t|ttfrY|rV|d}t|ttfr#ttt|}nt |}nt |}d}t|trt |St|t r|S|tus|tS|turtS|turtS|turtS|rtS t|t rt!d|dn#t"$rYnwxYwt%|S)zFind the most appropriate :class:`ParamType` for the given Python type. If the type isn't provided, it can be inferred from a default value. FNrTz3Attempted to use an uninstantiated parameter type (z).)rrryrrrrirrGryrFrrrrDr issubclassAssertionErrorrrU)ror{ guessed_typeitems r!rmrmsx L zg) gt} - -  $qz dUDM22$s4//BBdBgB "eRyy"i    SyyBJ  Syy  U{{  Tzz   "i(( $P"PPP     D    s(D>> E  E r()6r)r\rttypingrBrrrr_compatrr exceptionsr utilsr r r TYPE_CHECKINGtyping_extensionstecorerrshell_completionrrrNrUrhrpr{rrrrrrrrrrrJr0rFrirHrmrlryrrrrr-r#r!rs(  '''''' $$$$$$""""""?1""""000000BBBBBBBBJ$$$$$$$$)))))I)))0     9   i4h4h4h4h4h4Yh4h4h4VDDDDDyDDDN9$SJSJSJSJSJ+SJSJSJl'4)(I(I(I(I(I!>(I(I(IVI2 0s9s9s9s9s99s9s9s9l==#>====v7v7v7v7v79v7v7v7r/L/L/L/L/L /L/L/Ld99QZ&9AE1B9i9999N#"$$    lnn }r#