[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.118.1.89: ~ $


e([V�*�@s9ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZdd	�Zd
d�Z
dd
d�Zdd�Zdddd�Zddd�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd �Zd!d"�Zdd#lmZmZmZmZdS)$�N)�update_wrapper�)�	iteritems)�_check_for_unicode_literals)�echo)�get_current_contextcs�fdd�}t|��S)z]Marks a callback as wanting to receive the current context
    object as first argument.
    cs�t�||�S)N)r)�args�kwargs)�f��/decorators.py�new_funcszpass_context.<locals>.new_func)r)r
r
r)r
r�pass_contextsrcs�fdd�}t|��S)z�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)r�obj)rr	)r
rrr
szpass_obj.<locals>.new_func)r)r
r
r)r
r�pass_objsrFcs��fdd�}|S)a.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%���fdd�}t|��S)Ncsot�}�r!|j��}n|j��}|dkrOtd�j��|j�||dd�|�S)NzGManaged to invoke callback without a context object of type %r existingr)rZ
ensure_objectZfind_object�RuntimeError�__name__Zinvoke)rr	�ctxr)�ensurer
�object_typerrr
6s	
z8make_pass_decorator.<locals>.decorator.<locals>.new_func)r)r
r
)rr)r
r�	decorator5sz&make_pass_decorator.<locals>.decoratorr)rrrr)rrr�make_pass_decorators
rcCs�t|t�rtd��y|j}|j�|`Wntk
rRg}YnX|jd�}|dkr�tj|�}t|t	�r�|j
d�}ntj|�}||d<t�|d|p�|j
j�d|d||�S)Nz5Attempted to convert a callback into a command twice.�helpzutf-8�name�callback�params)�
isinstance�Command�	TypeError�__click_params__�reverse�AttributeError�get�inspectZgetdoc�bytes�decode�cleandocrr�lower)r
r�attrs�clsrrrrr�
_make_commandEs$	



r*cs.�dkrt����fdd�}|S)a*Creates 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.  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.
    :param cls: the command class to instantiate.  This defaults to
                :class:`Command`.
    Ncs%t|����}|j|_|S)N)r*�__doc__)r
�cmd)r(r)rrrrrszcommand.<locals>.decorator)r)rr)r(rr)r(r)rr�command\sr-cKs|jdt�t||�S)z�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`.
    r))�
setdefault�Groupr-)rr(rrr�groupysr0cCsNt|t�r"|jj|�n(t|d�s:g|_|jj|�dS)Nr)rrr�append�hasattrr)r
�paramrrr�_param_memo�s
	r4cs��fdd�}|S)a�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)Nr))�pop�Argumentr4)r
Z
ArgumentClass)r(�param_declsrrr�szargument.<locals>.decoratorr)r7r(rr)r(r7r�argument�s
r8cs��fdd�}|S)a�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`.
    csOd�kr#tj�d��d<�jdt�}t||����|S)Nrr))r#r&r5�Optionr4)r
ZOptionClass)r(r7rrr�s
zoption.<locals>.decoratorr)r7r(rr)r(r7r�option�s
r:cs��fdd�}|S)a�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
    csudd�}�jdd��jd|��jdd��jdd	��jd
d�t�phd
��|�S)NcSs|s|j�dS)N)�abort)rr3�valuerrrr�sz8confirmation_option.<locals>.decorator.<locals>.callback�is_flagTr�expose_valueF�promptzDo you want to continue?rz%Confirm the action without prompting.�--yes)r@)r.r:)r
r)r(r7rrr�sz&confirmation_option.<locals>.decoratorr)r7r(rr)r(r7r�confirmation_option�s
rAcs��fdd�}|S)aLShortcut 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�jdd��jdd��jdd�t�p<d��|�S)Nr?TZconfirmation_promptZ
hide_input�
--password)rB)r.r:)r
)r(r7rrr�sz"password_option.<locals>.decoratorr)r7r(rr)r(r7r�password_option�srCcsF�dkr'tjd�jjd������fdd�}|S)acAdds 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`.
    Nrrcs��jdd���jdd������fdd�}�jdd��jdd	��jd
d��jdd�|�d
<t�p�d��|�S)N�	prog_name�messagez%(prog)s, version %(version)sc
s|s|jrdS�}|dkr5|j�j}�}|dkr�yddl}Wntk
rkYnfXxb|jD]W}|j�jd�p�i}x3t|�D]%\}}	|	j	�kr�|j
}Pq�WqvW|dkr�td��t�d|d|id|j
�|j�dS)NrZconsole_scriptszCould not determine version�prog�version�color)�resilient_parsingZ	find_rootZ	info_name�
pkg_resources�ImportErrorZworking_setZ
get_entry_mapr"r�module_namerGrrrH�exit)
rr3r<rFZverrJZdist�scriptsZscript_nameZentry_point)rE�modulerDrGrrr�s0
		

z3version_option.<locals>.decorator.<locals>.callbackr=Tr>F�is_eagerrzShow the version and exit.r�	--version)rQ)r5r.r:)r
r)r(rOr7rG)rErDrr�s
z!version_option.<locals>.decorator)�sys�	_getframe�	f_globalsr")rGr7r(rr)r(rOr7rGr�version_option�s%rUcs��fdd�}|S)alAdds 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`.
    csodd�}�jdd��jdd��jdd��jd	d�|�d
<t�pbd��|�S)
NcSs7|r3|jr3t|j�d|j�|j�dS)NrH)rIrZget_helprHrM)rr3r<rrrr"sz0help_option.<locals>.decorator.<locals>.callbackr=Tr>FrzShow this message and exit.rPr�--help)rV)r.r:)r
r)r(r7rrr!s
zhelp_option.<locals>.decoratorr)r7r(rr)r(r7r�help_options
rW)rr/r6r9)rRr#�	functoolsrZ_compatrZ_unicodefunrZutilsr�globalsrrrrr*r-r0r4r8r:rArCrUrWZcorerr/r6r9rrrr�<module>s(	
&		6

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 2.8 KB 0644
__init__.cpython-35.pyc File 2.8 KB 0644
_bashcomplete.cpython-35.opt-1.pyc File 2.45 KB 0644
_bashcomplete.cpython-35.pyc File 2.45 KB 0644
_compat.cpython-35.opt-1.pyc File 16.31 KB 0644
_compat.cpython-35.pyc File 16.31 KB 0644
_termui_impl.cpython-35.opt-1.pyc File 14.07 KB 0644
_termui_impl.cpython-35.pyc File 14.07 KB 0644
_textwrap.cpython-35.opt-1.pyc File 1.33 KB 0644
_textwrap.cpython-35.pyc File 1.33 KB 0644
_unicodefun.cpython-35.opt-1.pyc File 3.37 KB 0644
_unicodefun.cpython-35.pyc File 3.37 KB 0644
_winconsole.cpython-35.opt-1.pyc File 7.9 KB 0644
_winconsole.cpython-35.pyc File 7.9 KB 0644
core.cpython-35.opt-1.pyc File 57.77 KB 0644
core.cpython-35.pyc File 58.27 KB 0644
decorators.cpython-35.opt-1.pyc File 11.7 KB 0644
decorators.cpython-35.pyc File 11.7 KB 0644
exceptions.cpython-35.opt-1.pyc File 7.97 KB 0644
exceptions.cpython-35.pyc File 7.97 KB 0644
formatting.cpython-35.opt-1.pyc File 8.81 KB 0644
formatting.cpython-35.pyc File 8.81 KB 0644
globals.cpython-35.opt-1.pyc File 1.82 KB 0644
globals.cpython-35.pyc File 1.82 KB 0644
parser.cpython-35.opt-1.pyc File 12.19 KB 0644
parser.cpython-35.pyc File 12.19 KB 0644
termui.cpython-35.opt-1.pyc File 19.07 KB 0644
termui.cpython-35.pyc File 19.07 KB 0644
testing.cpython-35.opt-1.pyc File 10.59 KB 0644
testing.cpython-35.pyc File 10.59 KB 0644
types.cpython-35.opt-1.pyc File 18.07 KB 0644
types.cpython-35.pyc File 18.23 KB 0644
utils.cpython-35.opt-1.pyc File 14.36 KB 0644
utils.cpython-35.pyc File 14.36 KB 0644