403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/pluggy/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pluggy/__pycache__/_hooks.cpython-39.pyc
a

Pi�a�,�@s�dZddlZddlZddlZGdd�d�ZGdd�d�Zdd�Zeed	�Zd
d�Z	Gdd
�d
�Z
Gdd�d�ZGdd�d�ZGdd�d�Z
dS)zA
Internal hook annotation, representation and calling machinery.
�Nc@s"eZdZdZdd�Zddd�ZdS)	�HookspecMarkera,Decorator helper class for marking functions as hook specifications.

    You can instantiate it with a project_name to get a decorator.
    Calling :py:meth:`.PluginManager.add_hookspecs` later will discover all marked functions
    if the :py:class:`.PluginManager` uses the same project_name.
    cCs
||_dS�N��project_name��selfr�r�1/usr/lib/python3.9/site-packages/pluggy/_hooks.py�__init__szHookspecMarker.__init__NFcs*����fdd�}|dur"||�S|SdS)akif passed a function, directly sets attributes on the function
        which will make it discoverable to :py:meth:`.PluginManager.add_hookspecs`.
        If passed no function, returns a decorator which can be applied to a function
        later using the attributes supplied.

        If ``firstresult`` is ``True`` the 1:N hook call (N being the number of registered
        hook implementation functions) will stop at I<=N when the I'th function
        returns a non-``None`` result.

        If ``historic`` is ``True`` calls to a hook will be memorized and replayed
        on later registered plugins.

        cs0�r�rtd��t|�jdt���d��|S)Nz'cannot have a historic firstresult hookZ_spec)�firstresult�historic�warn_on_impl)�
ValueError�setattrr�dict��func�rrrr
rr	�setattr_hookspec_opts%s��	z6HookspecMarker.__call__.<locals>.setattr_hookspec_optsNr)r�functionrrr
rrrr	�__call__szHookspecMarker.__call__)NFFN��__name__�
__module__�__qualname__�__doc__r
rrrrr	r	s�rc@s"eZdZdZdd�Zddd�ZdS)	�HookimplMarkera)Decorator helper class for marking functions as hook implementations.

    You can instantiate with a ``project_name`` to get a decorator.
    Calling :py:meth:`.PluginManager.register` later will discover all marked functions
    if the :py:class:`.PluginManager` uses the same project_name.
    cCs
||_dSrrrrrr	r
AszHookimplMarker.__init__NFcs.������fdd�}|dur"|S||�SdS)a~if passed a function, directly sets attributes on the function
        which will make it discoverable to :py:meth:`.PluginManager.register`.
        If passed no function, returns a decorator which can be applied to a
        function later using the attributes supplied.

        If ``optionalhook`` is ``True`` a missing matching hook specification will not result
        in an error (by default it is an error if no matching spec is found).

        If ``tryfirst`` is ``True`` this hook implementation will run as early as possible
        in the chain of N hook implementations for a specification.

        If ``trylast`` is ``True`` this hook implementation will run as late as possible
        in the chain of N hook implementations.

        If ``hookwrapper`` is ``True`` the hook implementations needs to execute exactly
        one ``yield``.  The code before the ``yield`` is run early before any non-hookwrapper
        function is run.  The code after the ``yield`` is run after all non-hookwrapper
        function have run.  The ``yield`` receives a :py:class:`.callers._Result` object
        representing the exception or result outcome of the inner calls (including other
        hookwrapper calls).

        If ``specname`` is provided, it will be used instead of the function name when
        matching this hook implementation to a hook specification during registration.

        c
s$t|�jdt�����d��|S)NZ_impl)�hookwrapper�optionalhook�tryfirst�trylast�specname)rrrr�rrrr!rr rr	�setattr_hookimpl_optshs��z6HookimplMarker.__call__.<locals>.setattr_hookimpl_optsNr)rrrrrr r!r#rr"r	rDs$zHookimplMarker.__call__)NFFFFNrrrrr	r9s�rcCs@|�dd�|�dd�|�dd�|�dd�|�dd�dS)NrFr rrr!)�
setdefault)�optsrrr	�normalize_hookimpl_opts|s
r&Zpypy_version_infocCst�|�r,z
|j}Wq\ty(YdS0n0t�|�s\zt|d|�}WntyZYdS0zt�|�}Wnty~YdS0t	|j
�|j}}|r�t|�}|d|�t	||d��}}nd}t
s�dnd}|�rt�|��sdt|dd�v�r|d	|v�r|d
d�}||fS)z�Return tuple of positional and keywrord argument names for a function,
    method, class or callable.

    In case of a class, its ``__init__`` method is considered.
    For methods the ``self`` parameter is not included.
    )rrrNr�r)r�obj�.rr�)�inspectZisclassr
�AttributeErrorZ	isroutine�getattr�	ExceptionZgetfullargspec�	TypeError�tuple�args�defaults�len�_PYPYZismethod)r�specr1r2�index�kwargsZimplicit_namesrrr	�varnames�s8




 �
�r8c@seZdZdZdS)�
_HookRelayzghook holder object for performing 1:N hook calls where N is the number
    of registered plugins.

    N)rrrrrrrr	r9�sr9c@speZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zddd�Zdd�Z
dd�ZdS)�_HookCallerNcCsH||_g|_g|_||_d|_d|_|durD|dus8J�|�||�dSr)�name�	_wrappers�_nonwrappers�	_hookexec�
_call_historyr5�set_specification)rr;Zhook_execute�specmodule_or_class�	spec_optsrrr	r
�sz_HookCaller.__init__cCs
|jduSr)r5r'rrr	�has_spec�sz_HookCaller.has_speccCs0|��rJ�t||j|�|_|�d�r,g|_dS)Nr)rC�HookSpecr;r5�getr?)rrArBrrr	r@�s
z_HookCaller.set_specificationcCs
|jduSr)r?r'rrr	�is_historic�sz_HookCaller.is_historiccs<�fdd�}||j�dur8||j�dur8td��d���dS)Ncs,t|�D]\}}|j�kr||=dSqdS)NT)�	enumerate�plugin)Zwrappers�i�method�rHrr	�remove�s
z*_HookCaller._remove_plugin.<locals>.removezplugin z
 not found)r<r=r)rrHrLrrKr	�_remove_plugin�sz_HookCaller._remove_plugincCs|j|jSr)r=r<r'rrr	�
get_hookimpls�sz_HookCaller.get_hookimplscCsv|jr|j}n|j}|jr(|�d|�nJ|jr:|�|�n8t|�d}|dkrb||jrb|d8}qF|�|d|�dS)z,Add an implementation to the callback chain.rr*N)rr<r=r �insertr�appendr3)r�hookimpl�methodsrIrrr	�
_add_hookimpl�s
z_HookCaller._add_hookimplcCsd|j�d�S)Nz
<_HookCaller �>)r;r'rrr	�__repr__�sz_HookCaller.__repr__cOs�|rtd��|��rJ�|jrt|jjD]<}||vr&tt|jj�|���}tjd�	|�dd�qdq&|jj
�d�}nd}|�|j
|��||�S)Nz,hook calling supports only keyword argumentszTArgument(s) {} which are declared in the hookspec can not be found in this hook call�)�
stacklevelrF)r/rFr5�argnamesr0�set�keys�warnings�warn�formatr%rEr>r;rN)rr1r7�argnameZ	notincallrrrr	r�s"��z_HookCaller.__call__cCsP|j�|pi|f�|�|j|��|d�}|dur6dS|p<gD]}||�q>dS)aCall the hook with given ``kwargs`` for all registered plugins and
        for all plugins which will be registered afterwards.

        If ``result_callback`` is not ``None`` it will be called for for each
        non-``None`` result obtained from a hook implementation.
        FN)r?rPr>r;rN)r�result_callbackr7�res�xrrr	�
call_historicsz_HookCaller.call_historicc	Cstt|j�t|j�f}|D]*}tdddd�}tdd||�}|�|�qz|fi|��W|\|_|_S|\|_|_0dS)zCall the hook with some additional temporarily participating
        methods using the specified ``kwargs`` as call parameters.F)rr rNz<temp>)�listr=r<r�HookImplrS)rrRr7�oldrJr%rQrrr	�
call_extras�z_HookCaller.call_extracCsH|��rD|jD]4\}}|�|j|g|d�}|r|dur||d�qdS)zAApply call history to a new hookimpl if it is marked as historic.FNr)rFr?r>r;)rrJr7r_r`rrr	�_maybe_apply_history(s
z _HookCaller._maybe_apply_history)NN)NN)rrrr
rCr@rFrMrNrSrUrrbrfrgrrrr	r:�s


r:c@seZdZdd�Zdd�ZdS)rdcCs:||_t|j�\|_|_||_||_||_|j�|�dSr)	rr8rX�
kwargnamesrHr%�plugin_name�__dict__�update)rrHrirZhook_impl_optsrrr	r
2szHookImpl.__init__cCsd|j�d|j�d�S)Nz<HookImpl plugin_name=z	, plugin=rT)rirHr'rrr	rU:szHookImpl.__repr__N)rrrr
rUrrrr	rd1srdc@seZdZdd�ZdS)rDcCsB||_t||�|_}||_t|�\|_|_||_|�d�|_	dS)Nr
)
�	namespacer-rr;r8rXrhr%rEr
)rrlr;r%rrrr	r
?szHookSpec.__init__N)rrrr
rrrr	rD>srD)rr+�sysr[rrr&�hasattrr4r8r9r:rdrDrrrr	�<module>s0C
*y

Youez - 2016 - github.com/yon3zu
LinuXploit