https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/click/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/click/decorators.pyc
�
./�_c@s0ddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lmZdd
l
mZddlmZd�Zd
�Zed�Zd�Zddd�Zdd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�ZdS(i����N(tupdate_wrapperi(t	iteritems(t_check_for_unicode_literals(tArgument(tCommand(tGroup(tOption(tget_current_context(techocs�fd�}t|��S(s]Marks a callback as wanting to receive the current context
    object as first argument.
    cs�t�||�S(N(R(targstkwargs(tf(s1/tmp/pip-install-sTXtzD/click/click/decorators.pytnew_funcs(R(RR((Rs1/tmp/pip-install-sTXtzD/click/click/decorators.pytpass_contextscs�fd�}t|��S(s�Similar to :func:`pass_context`, but only pass the object on the
    context onwards (:attr:`Context.obj`).  This is useful if that object
    represents the state of a nested system.
    cs�t�j||�S(N(Rtobj(R	R
(R(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR s(R(RR((Rs1/tmp/pip-install-sTXtzD/click/click/decorators.pytpass_objscs��fd�}|S(s.Given an object type this creates a decorator that will work
    similar to :func:`pass_obj` but instead of passing the object of the
    current context, it will find the innermost context of type
    :func:`object_type`.

    This generates a decorator that works roughly like this::

        from functools import update_wrapper

        def decorator(f):
            @pass_context
            def new_func(ctx, *args, **kwargs):
                obj = ctx.find_object(object_type)
                return ctx.invoke(f, obj, *args, **kwargs)
            return update_wrapper(new_func, f)
        return decorator

    :param object_type: the type of the object to pass.
    :param ensure: if set to `True`, a new object will be created and
                   remembered on the context if it's not there yet.
    cs"���fd�}t|��S(Ncsmt�}�r!|j��}n|j��}|dkrWtdj�j���n|j�|||�S(NsIManaged to invoke callback without a context object of type '{}' existing(Rt
ensure_objecttfind_objecttNonetRuntimeErrortformatt__name__tinvoke(R	R
tctxR(tensureRtobject_type(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR>s	(R(RR(RR(Rs1/tmp/pip-install-sTXtzD/click/click/decorators.pyt	decorator=s
((RRR((RRs1/tmp/pip-install-sTXtzD/click/click/decorators.pytmake_pass_decorator&sc	Cs�t|t�rtd��ny|j}|j�|`Wntk
rTg}nX|jd�}|dkr�tj	|�}t|t
�r�|jd�}q�ntj|�}||d<t
�|d|p�|jj�jdd�d|d||�S(	Ns5Attempted to convert a callback into a command twice.thelpsutf-8tnamet_t-tcallbacktparams(t
isinstanceRt	TypeErrort__click_params__treversetAttributeErrortgetRtinspecttgetdoctbytestdecodetcleandocRRtlowertreplace(RRtattrstclsR!R((s1/tmp/pip-install-sTXtzD/click/click/decorators.pyt
_make_commandPs*	




!cs.�dkrt�n���fd�}|S(srCreates a new :class:`Command` and uses the decorated function as
    callback.  This will also automatically attach all decorated
    :func:`option`\s and :func:`argument`\s as parameters to the command.

    The name of the command defaults to the name of the function with
    underscores replaced by dashes.  If you want to change that, you can
    pass the intended name as the first argument.

    All keyword arguments are forwarded to the underlying command class.

    Once decorated the function turns into a :class:`Command` instance
    that can be invoked as a command line utility or be attached to a
    command :class:`Group`.

    :param name: the name of the command.  This defaults to the function
                 name with underscores replaced by dashes.
    :param cls: the command class to instantiate.  This defaults to
                :class:`Command`.
    cs%t|����}|j|_|S(N(R1t__doc__(Rtcmd(R/R0R(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR�sN(RR(RR0R/R((R/R0Rs1/tmp/pip-install-sTXtzD/click/click/decorators.pytcommandjs	cKs|jdt�t||�S(s�Creates a new :class:`Group` with a function as callback.  This
    works otherwise the same as :func:`command` just that the `cls`
    parameter is set to :class:`Group`.
    R0(t
setdefaultRR4(RR/((s1/tmp/pip-install-sTXtzD/click/click/decorators.pytgroup�scCsQt|t�r"|jj|�n+t|d�s=g|_n|jj|�dS(NR$(R"RR!tappendthasattrR$(Rtparam((s1/tmp/pip-install-sTXtzD/click/click/decorators.pyt_param_memo�s
cs��fd�}|S(s�Attaches an argument to the command.  All positional arguments are
    passed as parameter declarations to :class:`Argument`; all keyword
    arguments are forwarded unchanged (except ``cls``).
    This is equivalent to creating an :class:`Argument` instance manually
    and attaching it to the :attr:`Command.params` list.

    :param cls: the argument class to instantiate.  This defaults to
                :class:`Argument`.
    cs,�jdt�}t||����|S(NR0(tpopRR:(Rt
ArgumentClass(R/tparam_decls(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR�s((R=R/R((R/R=s1/tmp/pip-install-sTXtzD/click/click/decorators.pytargument�scs��fd�}|S(s�Attaches an option to the command.  All positional arguments are
    passed as parameter declarations to :class:`Option`; all keyword
    arguments are forwarded unchanged (except ``cls``).
    This is equivalent to creating an :class:`Option` instance manually
    and attaching it to the :attr:`Command.params` list.

    :param cls: the option class to instantiate.  This defaults to
                :class:`Option`.
    cs^�j�}d|kr2tj|d�|d<n|jdt�}t||�|��|S(NRR0(tcopyR(R,R;RR:(Rtoption_attrstOptionClass(R/R=(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR�s((R=R/R((R/R=s1/tmp/pip-install-sTXtzD/click/click/decorators.pytoption�s
cs��fd�}|S(s�Shortcut for confirmation prompts that can be ignored by passing
    ``--yes`` as parameter.

    This is equivalent to decorating a function with :func:`option` with
    the following parameters::

        def callback(ctx, param, value):
            if not value:
                ctx.abort()

        @click.command()
        @click.option('--yes', is_flag=True, callback=callback,
                      expose_value=False, prompt='Do you want to continue?')
        def dropdb():
            pass
    csrd�}�jdt��jd|��jdt��jdd��jdd�t�ped
��|�S(NcSs|s|j�ndS(N(tabort(RR9tvalue((s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR �stis_flagR texpose_valuetpromptsDo you want to continue?Rs%Confirm the action without prompting.s--yes(s--yes(R5tTruetFalseRB(RR (R/R=(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR�s	((R=R/R((R/R=s1/tmp/pip-install-sTXtzD/click/click/decorators.pytconfirmation_option�scs��fd�}|S(sLShortcut for password prompts.

    This is equivalent to decorating a function with :func:`option` with
    the following parameters::

        @click.command()
        @click.option('--password', prompt=True, confirmation_prompt=True,
                      hide_input=True)
        def changeadmin(password):
            pass
    csI�jdt��jdt��jdt�t�p<d��|�S(NRGtconfirmation_promptt
hide_inputs
--password(s
--password(R5RHRB(R(R/R=(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR�s((R=R/R((R/R=s1/tmp/pip-install-sTXtzD/click/click/decorators.pytpassword_option�s
cs^�dkrBttd�r9tjd�jjd��qBd�n����fd�}|S(scAdds a ``--version`` option which immediately ends the program
    printing out the version number.  This is implemented as an eager
    option that prints the version and exits the program in the callback.

    :param version: the version number to show.  If not provided Click
                    attempts an auto discovery via setuptools.
    :param prog_name: the name of the program (defaults to autodetection)
    :param message: custom message to show instead of the default
                    (``'%(prog)s, version %(version)s'``)
    :param others: everything else is forwarded to :func:`option`.
    t	_getframeiRtcs��jdd���jdd������fd�}�jdt��jdt��jdt��jdd	�|�d
<t�p�d��|�S(
Nt	prog_nametmessages%(prog)s, version %(version)sc
s'|s|jrdS�}|dkr8|j�j}n�}|dkr�yddl}Wntk
rmniXxe|jD]Z}|j�jd�p�i}x6t	|�D](\}}	|	j
�kr�|j}Pq�q�WqxW|dkr�td��q�nt
�i|d6|d6d|j�|j�dS(Ni����tconsole_scriptssCould not determine versiontprogtversiontcolor(tresilient_parsingRt	find_roott	info_namet
pkg_resourcestImportErrortworking_sett
get_entry_mapR'Rtmodule_nameRTRRRUtexit(
RR9RDRStverRYtdisttscriptsRtentry_point(RQtmoduleRPRT(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR s*
	%RERFtis_eagerRsShow the version and exit.R s	--version(s	--version(R;RR5RHRIRB(RR (R/RcR=RT(RQRPs1/tmp/pip-install-sTXtzD/click/click/decorators.pyRs
N(RR8tsysRNt	f_globalsR'(RTR=R/R((R/RcR=RTs1/tmp/pip-install-sTXtzD/click/click/decorators.pytversion_option�s	#cs��fd�}|S(slAdds a ``--help`` option which immediately ends the program
    printing out the help page.  This is usually unnecessary to add as
    this is added by default to all commands unless suppressed.

    Like :func:`version_option`, this is implemented as eager option that
    prints in the callback and exits.

    All arguments are forwarded to :func:`option`.
    csld�}�jdt��jdt��jdd��jdt�|�d<t�p_d	��|�S(
NcSs:|r6|jr6t|j�d|j�|j�ndS(NRU(RVRtget_helpRUR^(RR9RD((s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR AsRERFRsShow this message and exit.RdR s--help(s--help(R5RHRIRB(RR (R/R=(s1/tmp/pip-install-sTXtzD/click/click/decorators.pyR@s	
((R=R/R((R/R=s1/tmp/pip-install-sTXtzD/click/click/decorators.pythelp_option5s
( R(Ret	functoolsRt_compatRt_unicodefunRtcoreRRRRtglobalsRtutilsRR
RRIRR1RR4R6R:R>RBRJRMRgRi(((s1/tmp/pip-install-sTXtzD/click/click/decorators.pyt<module>s.		*							!	8

https://t.me/AnonymousX5 - 2025