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/sphinx/domains/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/domains/__pycache__/python.cpython-39.pyc
a

�ab|��@s2dZddlZddlZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZddlmZmZddlmZddlmZdd	lmZdd
lmZmZm Z ddl!m"Z"ddl#m$Z$dd
l%m&Z&m'Z'ddl(m)Z)ddl*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl4m6Z7ddl8m9Z9ddl:m;Z;ddl<m=Z=m>Z>m?Z?ddl@mAZAddlBmCZCddlDmEZEmFZFmGZGddlHmIZImJZJe;�KeL�ZMe�NdejO�ZPe2d�e2d�e2d�e2d�e2d �e2d!�e2d"�d#�ZQGd$d%�d%e
�ZRGd&d'�d'e
�ZSdkeTeUeeTeTeTeUfd)�d*d+�ZVdleTe0eUejd,�d-d.�ZWdmeTe0eed/�d0d1�ZXdneTe0ejYd2�d3d4�ZZeeTdd5�d6d7�Z[Gd8d9�d9�Z\Gd:d;�d;e\e=�Z]Gd<d=�d=e\e>�Z^Gd>d?�d?e\e?�Z_Gd@dA�dAe)eeTeTf�Z`GdBdC�dCe`�ZaGdDdE�dEea�ZbGdFdG�dGe`�ZcGdHdI�dIe`�ZdGdJdK�dKe`�ZeGdLdM�dMee�ZfGdNdO�dOee�ZgGdPdQ�dQee�ZhGdRdS�dSe`�ZiGdTdU�dUe`�ZjGdVdW�dW�ZkGdXdY�dYeA�ZlGdZd[�d[eA�ZmGd\d]�d]e9�Zne"eTeTedd^�d_d`�ZoGdadb�dbe,�ZpGdcdd�dde+�Zqe"e0eeede�dfdg�Zre"e	eTefdh�didj�ZsdS)oz�
    sphinx.domains.python
    ~~~~~~~~~~~~~~~~~~~~~

    The Python domain.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�	Parameter)
�Any�Dict�Iterable�Iterator�List�
NamedTuple�Optional�Tuple�Type�cast)�nodes)�Element�Node)�
directives)�Inliner)�addnodes)�desc_signature�pending_xref�pending_xref_condition)�Sphinx)�Builder)�RemovedInSphinx50Warning�RemovedInSphinx60Warning)�ObjectDescription)�Domain�Index�
IndexEntry�ObjType)�BuildEnvironment)�_�__)�ast)�parse)�XRefRole)�logging)�Field�GroupedField�
TypedField)�SphinxDirective)�signature_from_str)�find_pending_xref_condition�make_id�make_refnode)�
OptionSpec�TextlikeNodea^ ([\w.]*\.)?            # class name(s)
          (\w+)  \s*             # thing name
          (?: \(\s*(.*)\s*\)     # optional: arguments
           (?:\s* -> \s* (.*))?  #           return annotation
          )? $                   # and nothing more
          �module�keyword�operator�object�	exception�	statementzbuilt-in function)r0r1r2r3r4r5�builtinc@s.eZdZUeed<eed<eed<eed<dS)�ObjectEntry�docname�node_id�objtype�aliasedN��__name__�
__module__�__qualname__�str�__annotations__�bool�rCrC�9/usr/lib/python3.9/site-packages/sphinx/domains/python.pyr7Ds
r7c@s6eZdZUeed<eed<eed<eed<eed<dS)�ModuleEntryr8r9�synopsis�platform�
deprecatedNr<rCrCrCrDrEKs

rEF)�	reftarget�suppress_prefix�returncCs�d}|�d�r$|dd�}|}d}nV|�d�rJ|dd�}|�d�d}n0|r^|�d�d}n|�d�rv|d	d�}n|}|d
ks�|�d�r�d}nd}||||fS)
zLParse a type string and return (reftype, reftarget, title, refspecific flag)F�.�NT�~����typing.��None�obj�class)�
startswith�split)rIrJ�refspecific�title�reftyperCrCrD�parse_reftargetSs"


rZ)�target�envrJrKc	Cs�|r |j�d�|j�d�d�}ni}t||�\}}}}|jjrj|�d�d}td|dd�td|d	d�g}nt�|�g}t	dg|�Rd
|||d�|��S)z0Convert a type string to a cross reference node.�	py:module�py:class)r]r^rLrO��resolved��	condition�*�py)�	refdomainrYrIrW)
�ref_context�getrZ�config�!python_use_unqualified_type_namesrVrr
�Textr)	r[r\rJ�kwargsrYrXrW�	shortname�	contnodesrCrCrD�type_to_xrefns$

����rn)�
annotationr\rKcstjttd��fdd��|dur2tjdtdd�z�t|�}g}�|�D]�}t|t	j
�rh|�|d�qHt|t	j�r�|�
�r�|r�t|d	tj�r�|d	��d
kr�|��|�tt|�|dd��q�|�tt|�|��qH|�|�qH|WSt�yt||�gYS0dS)
zParse type annotation.��noderKcs8t|tj�r,t�d�|j�d|jf�gSt|tj�rf�|j�}|�	�|j
��|�	�|j��|St|tj�r�t
��t
�dd�t
��gSt|tj��r,|jtur�t
�dd�gSt|jt�r�t
�dt|j��gSt|jt��r�t
�dt|j��gSt|jt��rt
�dt|j��gSt�t|j��gS�nt|tj��rD�|j�St|tj��r\�|j�St|tj��rxt
�dd�gSt|tj��r�t
�dd�g}|j�r�|jD]4}|�	�|��|�t
�dd��|�t
����q�|��|��|�t
�dd	��|St|tj ��r&t!�fd
d�|j"D�g�St|tj#��rBt�|j$�gSt|tj%��r�|j�}|�t
�dd��|�	�|j&��|�t
�dd	��|ddv�r�t'|d
d�d
d�D]*\}}t|tj��r�t�(dd|�||<�q�|St|tj)��r�|j
��|j*�St|tj+��r�|j�rjg}|jD]4}|�	�|��|�t
�dd��|�t
����q"|��|��nt
�dd�t
�dd�g}|St,j-dk�r0t|tj.��r�t
�dt|j/��gSt|tj��r�t
�dd�gSt|tj0��r�t�|j�gSt|tj1��rt
�dt|j2��gSt|tj3��r0t
�dt|j/��gSt4�dS)Nz%s.%srr_�|z...rN�[�,�]c3s|]}�|�VqdS�NrC)�.0�e��unparserCrD�	<genexpr>��z5_parse_annotation.<locals>.unparse.<locals>.<genexpr>��Literalztyping.LiteralrM)�start�(�))��)5�
isinstancer"Z	Attributer
rj�value�attrZBinOp�left�extend�op�rightZBitOrr�desc_sig_space�desc_sig_punctuationZConstant�EllipsisrB�desc_sig_keyword�repr�intZdesc_sig_literal_numberr@Zdesc_sig_literal_stringZExprrZInvertr�elts�append�popZModule�sum�body�Name�idZ	Subscript�slice�	enumerate�literalZUnaryOp�operandr
�sys�version_infoZBytes�sZNameConstantZNum�nZStr�SyntaxError)rq�result�elem�iZsubnoderyrCrDrz�s� 

�








�z"_parse_annotation.<locals>.unparseNz=The env parameter for _parse_annotation becomes required now.���
stacklevelrrOrNT)rJ)r"ZASTrr�warnings�warnr�	ast_parser�r
r�r�rj�striprr��astextr�rnr@r�)ror\Ztreer�rqrCryrD�_parse_annotation�s,\��r�)�arglistr\rKc
Cst�|�}td|�}d}|j��D�]�}|j|jkrZ||jkrZ|t�ddt�dd��7}|j|j	kr�||j
|jdfvr�|t�ddt�dd��7}t��}|j|jkr�|t�dd�7}|t�d|j
�7}nB|j|jkr�|t�dd�7}|t�d|j
�7}n|t�d|j
�7}|j|ju�rZt|j|�}|t�dd�7}|t��7}|tjddg|�R�7}|j|ju�r�|j|ju�r�|t��7}|t�dd�7}|t��7}n|t�dd�7}|tjd|jd	gd
d�7}||7}|j}q$|tjk�r|t�ddt�dd��7}|S)z*Parse a list of arguments using AST parserz(%s)Nr_�/rcz**�:�=Z
default_valueF)�classesZsupport_smartquotes)r�desc_parameterlistr*�
parameters�values�kindZPOSITIONAL_ONLY�desc_parameterZdesc_sig_operatorZKEYWORD_ONLYZPOSITIONAL_OR_KEYWORDZVAR_POSITIONAL�
desc_sig_name�nameZVAR_KEYWORDro�emptyr�r�r��defaultr
Zinliner)r�r\�params�sigZ	last_kind�paramrq�childrenrCrCrD�_parse_arglist�sL
��r�)�signoder�rKcCs�t��}|g}�z`|�d�D�]<}|��}d}}|�d�rp|�t���|d|d7<|dd���}q2|�d�r�|��|dd���}qp|�d�r�|�d	�s�|d7}|dd���}q�|�d�r�|d7}|dd���}q�|�r|dt�	d
d
t�
||��7<|�rB|�t���|d|d7<|d8}�q|r|��|d8}�qBqt|�dk�rnt�Wn4t�y�t��}|t�	||�7}||7}Yn
0||7}dS)z�"Parse" a list of arguments separated by commas.

    Arguments can have "optional" annotations given by enclosing them in
    brackets.  Currently, this will split at any comma, even if it's inside a
    string literal (e.g. default argument value).
    rtrrs���rOrMNruz[]r_)
rr�rVr�rUr�Z
desc_optionalr��endswithr�r��len�
IndexError)r�r�Z	paramlist�stack�argumentZ	ends_openZ
ends_closerCrCrD�_pseudo_parse_arglist0sJ


�r�csxeZdZejddddfeeeeeee	e
eed�	�fdd�
Zejddddfeeeeeee	e
eeed�	dd�Z
�ZS)�PyXrefMixinN)	�rolename�domainr[�	innernode�contnoder\�inliner�locationrKc	
s�t�j||||||ddd�}	t|	t�r�d|	d<|j�d�|	d<|j�d�|	d<t|�\}
}}}
||kr�|
|	d<||	d<|	��|	|||�7}	n`|jj	r�|	j
}|	��|�d�d	}|d
|�}td
d
|dd�td
d
g|�Rd
di�g}|	�
|�|	S)N)r�r�TrWr]r^rYrIrLrOr_r`rarbrc)�super�	make_xrefr�rrfrgrZ�clearrhrir�rVrr�)�selfr�r�r[r�r�r\r�r�r�rYrIZreftitler r�rlZtextnoderm��	__class__rCrDr�ds0�

�
zPyXrefMixin.make_xrefc	
Cs�d}	t�|	�}
t�|	|�}t|o*|��|k�}d}
g}td|�D]`}|rRt�|�}|
s`|
�|�rv|�	|pp|||��n|�	|�
||||||||��|dvr@d}
q@|S)Nz8(\s*[\[\]\(\),](?:\s*or\s)?\s*|\s+or\s+|\s*\|\s*|\.\.\.)Fr}T)�re�compilerVrBr��filterr
rj�matchr�r�)r�r�r�r[r�r�r\r�r�ZdelimsZ	delims_reZsub_targetsZsplit_contnodeZ
in_literal�resultsZ
sub_targetrCrCrD�
make_xrefs�s"


�zPyXrefMixin.make_xrefs)r=r>r?r
Zemphasisr@rr/rrrr�rr��
__classcell__rCrCr�rDr�cs ��"�
�r�c@seZdZdS)�PyFieldN�r=r>r?rCrCrCrDr��sr�c@seZdZdS)�PyGroupedFieldNr�rCrCrCrDr��sr�c@seZdZdS)�PyTypedFieldNr�rCrCrCrDr��sr�c@s2eZdZUdZejejejejejd�Zee	d<e
ded�dddd	d
�e
ded�d
ddd	d
�eded�ddd	d�e
ded�ddd�eded�dddd�gZdZeeejd�dd�Zed �d!d"�Zeeeeefd#�d$d%�Zeeeefed&�d'd(�Zeeefeed)d*�d+d,�Zd)d �d-d.�Zd)d �d/d0�Zd)S)1�PyObjectz�
    Description of a general Python object.

    :cvar allow_nesting: Class is an object that allows for nested namespaces
    :vartype allow_nesting: bool
    )�noindex�noindexentryr0�	canonicalro�option_spec�	parameterZ
Parameters)r�r��argr�r1�kwargZkwparamrT)Z	paramtype�typeT)�label�namesZtyperolenameZ	typenames�can_collapse�variableZ	Variables)�varZivarZcvar)Zvartype�
exceptionsZRaises�exc)Zraises�raiser4�except)r�r�r�r�ZreturnvalueZReturnsF)�returnsrK)r��has_argr�Z
returntypezReturn type)Zrtype)r�r�r�Zbodyrolename�r�rKcCsgS)zTMay return a prefix to put before the object name in the
        signature.
        rC�r�r�rCrCrD�get_signature_prefix�szPyObject.get_signature_prefix�rKcCsdS)zqMay return true if an empty argument list is to be generated even if
        the document contains none.
        FrC�r�rCrCrD�
needs_arglist�szPyObject.needs_arglist�r�r�rKc
Cs�t�|�}|durt�|��\}}}}|j�d|jj�d��}|jj�d�}	|	r�d}
|r�||	ksn|�|	d�r�||}|t	|	�d��
d�}q�|r�|	d||}q�|	d|}n$d}
|r�|�d�}	||}nd}	|}||d<|	|d	<||d
<|�|�}|�rTt
|�tu�r8t�d�|�t�|t�|dt�|��7}n|tjt|�dg|�R�7}|�rl|t�||�7}n0|�r�|
�r�|jjj�r�|d}
|t�|
|
�7}|t�||�7}|�r(z|t||j�7}Wn^t�y�t||�YnBt�y$}z(tj d|||d
�t||�WYd}~n
d}~00n|�!��r>|t�"�7}|�rht#||j�}|tj$|dg|�R�7}|j�d�}|�r�|t�d|dt�%�t�|��7}||fS)aJTransform a Python signature into RST nodes.

        Return (fully qualified name of the thing, classname if any).

        If inside a class, the current class name is handled intelligently:
        * it is stripped from the displayed name if present
        * it is added to the full name (return value) if not present
        Nr0r]r^FrLTr_rT�fullnamez�Python directive method get_signature_prefix() returning a string is deprecated. It must now return a list of nodes. Return value was '{}'.z could not parse arglist (%r): %s�r�ro� )&�	py_sig_rer��
ValueError�groups�optionsrgr\rfrUr��lstrip�rstripr�r�r@r�r��formatrr�desc_annotationr
rj�desc_addnamerh�add_module_namesZ	desc_namer�r�r��NotImplementedError�logger�warningr�r�r�Zdesc_returnsr�)r�r�r��m�prefixr�r�Zretann�modname�	classnameZ
add_moduler�Z
sig_prefixZnodetextr�r�ZannorCrCrD�handle_signature�s�	
�


��
�
�"
�zPyObject.handle_signature)r
r�rKcCstd��dS)z2Return the text for the index entry of the object.z!must be implemented in subclassesN)r)r�r
r�rCrCrD�get_index_text:szPyObject.get_index_textN��name_clsr�r�rKc
Cs|j�d|jj�d��}|r$|dnd|d}t|j|jjd|�}|d�|�||krv||jjjvrv|d�|�|jj�	|�t
t|j�d��}|j
||j||d�|j�d	�}|r�|j
||j|d
|d�d|jv�r|�||�}	|	�r|jd
�d|	|ddf�dS)Nr0r]rLr_r�idsrdr�r�T)r;r�r��entries�single)rrgr\rfr,�state�documentr�r�note_explicit_targetr�PythonDomain�
get_domain�note_objectr:r�	indexnode)
r�rr�r�r
r�r9r�Zcanonical_name�	indextextrCrCrD�add_target_and_index>s$�zPyObject.add_target_and_indexcCs�d}|jr2|jd\}}|jr$|}n|r2|�d�}|rb||jjd<|jrb|jj�dg�}|�|�d|jvr�|jj�dg�}|�|jj�d��|jd|jjd<dS)	aHandle object nesting before content

        :py:class:`PyObject` represents Python language constructs. For
        constructs that are nestable, such as a Python classes, this method will
        build up a stack of the nesting hierarchy so that it can be later
        de-nested correctly, in :py:meth:`after_content`.

        For constructs that aren't nestable, the stack is bypassed, and instead
        only the most recent object is tracked. This object prefix name will be
        removed with :py:meth:`after_content`.
        NrOrLr^�
py:classesr0�
py:modulesr])	r��
allow_nestingr�r\rf�
setdefaultr�rrg)r�rr�Zname_prefixr��modulesrCrCrD�before_contentYs 


zPyObject.before_contentcCs�|jj�dg�}|jr6z|��Wnty4Yn0t|�dkrJ|dnd|jjd<d|jvr�|jj�dg�}|r�|��|jjd<n|jj�d�dS)	a^Handle object de-nesting after content

        If this class is a nestable object, removing the last nested class prefix
        ends further nesting in the object.

        If this class is not a nestable object, the list of classes should not
        be altered as we didn't affect the nesting levels in
        :py:meth:`before_content`.
        rrrONr^r0r r])r\rfr"r!r�r�r�r)r�r�r#rCrCrD�
after_contentzs
�

zPyObject.after_content)r=r>r?�__doc__r�flag�	unchangedr�r.rAr�r r�r&r�Zdoc_field_typesr!r@rr
rr�rBr�rr
rrrr$r%rCrCrCrDr��sL
�	
�
�����]�!r�cs�eZdZUdZej��Zeed<e�	de
ji�ee
ejd�dd�Zed�dd	�Zeeefeed
d��fdd
�Zeeeefed�dd�Z�ZS)�
PyFunctionzDescription of a function.r��asyncr�cCs&d|jvrt�dd�t��gSgSdS)Nr*r_)rrr�r�r�rCrCrDr��s


�zPyFunction.get_signature_prefixr�cCsdS)NTrCr�rCrCrDr��szPyFunction.needs_arglistNrc	s�t��|||�d|jvr�|j�d|jj�d��}|dd}|\}}|rvtd�||f}|jd�d||d	df�n*d
t	d|f}|jd�d||d	df�dS)
Nr�r0r]rr�%s() (in module %s)rrr_z%s; %s()r6�pair)
r�rrrgr\rfr rr��pairindextypes)	r�rr�r�r
r9r��cls�textr�rCrDr�s
zPyFunction.add_target_and_index�r
rrKcCsdSrvrC�r�r
rrCrCrDr�szPyFunction.get_index_text)r=r>r?r&r�r��copyr.rA�updaterr'r@rr
rr�rBr�r
rrrr�rCrCr�rDr)�s
��r)csVeZdZdZeed��fdd�Zeee	eefd��fdd�Z
ed�dd	�Z�Z
S)
�PyDecoratorFunctionzDescription of a decorator.r�csd|_t���S)Nzpy:function�r�r��runr�r�rCrDr6�szPyDecoratorFunction.runr�cs&t��||�}|�dt�dd��|S�Nr�@�r�r�insertrr�r�r�r��retr�rCrDr�sz$PyDecoratorFunction.handle_signaturecCsdS�NFrCr�rCrCrDr��sz!PyDecoratorFunction.needs_arglist�r=r>r?r&rrr6r@rr
rrBr�r�rCrCr�rDr4�sr4csteZdZUdZej��Zeed<e�	e
je
jd��ee
eeefd��fdd�Zeeeefed�dd	�Z�ZS)
�
PyVariablezDescription of a variable.r��r�r�r�cs�t��||�\}}|j�d�}|rVt||j�}|tj|dt�dd�t�	�g|�R�7}|j�d�}|r�|t�|dt�	�t�dd�t�	�t
�|��7}||fS�Nr�r_r�r�r��r�rrrgr�r\rrr�r�r
rj�r�r�r�r�r�typ�annotationsr�r�rCrDr�s&

��


�zPyVariable.handle_signaturer0cCs,|\}}|rtd�||fStd�|SdS)N�%s (in module %s)z%s (built-in variable))r )r�r
rr�r.rCrCrDr�szPyVariable.get_index_text�r=r>r?r&r�r�r2r.rAr3rr(r@rr
rrr�rCrCr�rDr?�s
�r?c@sheZdZUdZej��Zeed<e�	de
ji�dZe
eejd�dd�Ze
ee
e
fe
d�d	d
�ZdS)�PyClasslikezO
    Description of a class-like object (classes, interfaces, exceptions).
    r��finalTr�cCsDd|jvr,t�d�t��t�|j�t��gSt�|j�t��gSdS)NrI)rr
rjrr�r:r�rCrCrDr��s

�z PyClasslike.get_signature_prefixr0cCsL|jdkr2|std�|dStd�|d|fS|jdkrD|dSdSdS)NrTz%s (built-in class)rz%s (class in %s)r4r_)r:r r1rCrCrDrs

zPyClasslike.get_index_textN)r=r>r?r&r�r�r2r.rAr3rr'r!r@rr
rr�r
rrCrCrCrDrH�s
�rHc	@s�eZdZUdZej��Zeed<e�	e
je
je
je
je
je
jd��ed�dd�Z
eeejd�dd	�Zeeeefed
�dd�Zd
S)�PyMethodzDescription of a method.r�)�abstractmethodr*�classmethodrI�property�staticmethodr�cCsd|jvrdSdSdS)NrMFT)rr�rCrCrDr�s
zPyMethod.needs_arglistr�cCs�g}d|jvr,|�t�d��|�t���d|jvrT|�t�d��|�t���d|jvr||�t�d��|�t���d|jvr�|�t�d��|�t���d|jvr�|�t�d��|�t���d|jvr�|�t�d��|�t���|S)	NrIrK�abstractr*rLrMrNZstatic�rr�r
rjrr��r�r�rrCrCrDr�!s(





zPyMethod.get_signature_prefixr0cCs�|\}}z0|�dd�\}}|r6|jjjr6d�||g�}Wn6tyn|r^td�||fYSd|YSYn0d|jvr�td�||fSd|jvr�td�||fSd	|jvr�td
�||fStd�||fSdS)NrLrMr+z%s()rLz%s() (%s class method)rM�%s (%s property)rNz%s() (%s static method)z%s() (%s method))�rsplitr\rhr�joinr�r r)r�r
rr�r.�clsnameZmethnamerCrCrDr7s 


zPyMethod.get_index_textN)r=r>r?r&r�r�r2r.rAr3rr'rBr�r@rr
rr�r
rrCrCrCrDrJs
�	rJcs>eZdZUdZej��Zeed<e	e
d��fdd�Z�ZS)�
PyClassMethodzDescription of a classmethod.r�r�csd|_d|jd<t���S)N�	py:methodTrL�r�rr�r6r�r�rCrDr6Rs
zPyClassMethod.run�
r=r>r?r&r�r�r2r.rArrr6r�rCrCr�rDrVMs
rVcs>eZdZUdZej��Zeed<e	e
d��fdd�Z�ZS)�PyStaticMethodzDescription of a staticmethod.r�r�csd|_d|jd<t���S)NrWTrNrXr�r�rCrDr6^s
zPyStaticMethod.runrYrCrCr�rDrZYs
rZcsVeZdZdZeed��fdd�Zeee	eefd��fdd�Z
ed�dd	�Z�Z
S)
�PyDecoratorMethodz!Description of a decoratormethod.r�csd|_t���S)NrWr5r�r�rCrDr6hszPyDecoratorMethod.runr�cs&t��||�}|�dt�dd��|Sr7r9r;r�rCrDrlsz"PyDecoratorMethod.handle_signaturecCsdSr=rCr�rCrCrDr�qszPyDecoratorMethod.needs_arglistr>rCrCr�rDr[esr[csteZdZUdZej��Zeed<e�	e
je
jd��ee
eeefd��fdd�Zeeeefed�dd	�Z�ZS)
�PyAttribute�Description of an attribute.r�r@r�cs�t��||�\}}|j�d�}|rVt||j�}|tj|dt�dd�t�	�g|�R�7}|j�d�}|r�|t�|dt�	�t�dd�t�	�t
�|��7}||fSrArBrCr�rCrDr~s&

��


�zPyAttribute.handle_signaturer0cCs||\}}z0|�dd�\}}|r6|jjjr6d�||g�}Wn2tyj|r^td�||fYS|YSYn0td�||fS)NrLrMrFz%s (%s attribute)�rSr\rhrrTr�r �r�r
rr�r.rU�attrnamerCrCrDr�szPyAttribute.get_index_textrGrCrCr�rDr\us
�r\cs�eZdZdZej��Ze�ej	ej	ej
d��eee
eefd��fdd�Zeeejd�dd�Zee
eefed	�d
d�Z�ZS)�
PyPropertyr])rKrLr�r�cs^t��||�\}}|j�d�}|rVt||j�}|tj|dt�dd�t�	�g|�R�7}||fS)Nr�r_r�)
r�rrrgr�r\rrr�r�)r�r�r�r�rrDrEr�rCrDr�s

��
zPyProperty.handle_signaturer�cCsvg}d|jvr,|�t�d��|�t���d|jvrT|�t�d��|�t���|�t�d��|�t���|S)NrKrOrLrTrMrPrQrCrCrDr��s

zPyProperty.get_signature_prefixr0cCs||\}}z0|�dd�\}}|r6|jjjr6d�||g�}Wn2tyj|r^td�||fYS|YSYn0td�||fS)NrLrMrFrRr^r_rCrCrDr�szPyProperty.get_index_text)r=r>r?r&r�r�r2r3rr'r(r@rr
rrr
rr�rr�rCrCr�rDra�s
�

racs@eZdZdZeeeeefd��fdd�Zed�dd�Z	�Z
S)�PyDecoratorMixinz)
    Mixin for decorator directives.
    r�csf|jjD]&}|jdkrtjd|tdd�q@qtjdtdd�t��||�}|�dt	�
dd��|S)NZDirectiveAdapterzEPyDecoratorMixin is deprecated. Please check the implementation of %sr�r�zPyDecoratorMixin is deprecatedrr8)r��__mro__r=r�r�rr�rr:rr)r�r�r�r.r<r�rCrDr�s
���z!PyDecoratorMixin.handle_signaturer�cCsdSr=rCr�rCrCrDr��szPyDecoratorMixin.needs_arglist)r=r>r?r&r@rr
rrBr�r�rCrCr�rDrb�srbc@sfeZdZUdZdZdZdZdZdd�dd�ej	ej	d�Z
eed	<e
ed
�dd�Zeed
�dd�ZdS)�PyModulez8
    Directive to mark description of a new module.
    FrMrcCs|SrvrC��xrCrCrD�<lambda>�r|zPyModule.<lambda>cCs|SrvrCrerCrCrDrg�r|)rGrFr�rHr�r�c
	Cs,tt|j�d��}|jd��}d|jv}||jjd<g}|�s(t|j|j	j
d|�}tjdd|gdd�}|�
|�|�|�}||kr�||j	j
jvr�|d	�|�|j	j
�|�|�|||j�d
d�|j�dd�d|jv�|j|d||d
�|�|�dtd|f}tjd||ddfgd�}	|�|	�|S)Nrdrr�r]r0r_T)rZismodrrFrGrHr�z%s; %sr,)r)rrr\r�	argumentsr�rrfr,rrr
r[Zset_source_info�make_old_idrr�r�note_modulergrr-r�index)
r�r�r
r�r<r9r[Zold_node_idr�inoderCrCrDr6�s2


�

zPyModule.run)r�rKcCsd|S)z�Generate old styled node_id.

        Old styled node_id is incompatible with docutils' node_id.
        It can contain dots and hyphens.

        .. note:: Old styled node_id was mainly used until Sphinx-3.0.
        z	module-%srC)r�r�rCrCrDri szPyModule.make_old_idN)r=r>r?r&�has_content�required_arguments�optional_arguments�final_argument_whitespacerr'r�r.rArrr6r@rirCrCrCrDrd�s
�$rdc@s@eZdZUdZdZdZdZdZiZe	e
d<eed�dd�Z
d	S)
�PyCurrentModulez�
    This directive is just to tell Sphinx that we're documenting
    stuff in module foo, but links to module foo won't lead here.
    FrMrr�r�cCs8|jd��}|dkr(|jj�dd�n||jjd<gS)NrrRr])rhr�r\rfr�)r�r
rCrCrDr67s
zPyCurrentModule.runN)r=r>r?r&rmrnrorpr�r.rArrr6rCrCrCrDrq+s
rqc@s,eZdZeeeeeeeefd�dd�ZdS)�
PyXRefRole)r\�refnode�has_explicit_titlerXr[rKcCs�|j�d�|d<|j�d�|d<|sv|�d�}|�d�}|dd�dkrv|dd�}|�d�}|dkrv||dd�}|dd�dkr�|dd�}d|d	<||fS)
Nr]r^rLrNrrMrOTrW)rfrgr�rfind)r�r\rsrtrXr[�dotrCrCrD�process_linkAs


zPyXRefRole.process_linkN)	r=r>r?rrrBr@r
rwrCrCrCrDrr@s�rr)�appr�r:�contentrKcCsx|dkrdS|D]b}t|tj�rtttj|�}|D]<}ttj|d�����}|dksb|�	d�r4|�
|�qq4qdS)z+Filter ``:meta:`` field from its docstring.rdNr�metazmeta )r�r
Z
field_listrr�fieldZ
field_bodyr�r�rU�remove)rxr�r:ryrq�fieldsr{�
field_namerCrCrD�filter_meta_fieldsWs
rc@sReZdZdZdZed�Zed�Zd	ee	e
ee
e	eefe
fd�dd�ZdS)
�PythonModuleIndexz<
    Index subclass to provide the Python module index.
    ZmodindexzPython Module Indexr#N)�docnamesrKcCs�i}|jjjd}t|tdd�}t|jjd��dd�d�}d}d	}|D�]D\}\}}	}
}}|rj||vrjqH|D]&}
|�|
�rn|t|
�d�}|
}q�qnd}|s�|d}}|�|d	�	�g�}|�
d
�d	}||k�rN||k�r|�rH|d}t|d	d|d
|d|d|d|d�|d<n*|�|��sH|�t||dddddd��d
}n|d7}d	}|�rht
d�nd}|�t|||||	|||
��|}qHt|�||k}t|���}||fS)NZmodindex_common_prefixT)�key�reverser#cSs|d��S)Nr)�lowerrerCrCrDrgwr|z,PythonModuleIndex.generate.<locals>.<lambda>)r�r_rrLrOrMr�r����Z
Deprecated)r�r\rh�sortedr��data�itemsrUr"r�rVrr�r )r�r�ryZignoresr#Zprev_modnameZ
num_toplevelsr
r8r9rFZ	platformsrH�ignore�strippedr�packageZlast�subtypeZ	qualifierZcollapseZsorted_contentrCrCrD�generateosR�



�
�zPythonModuleIndex.generate)N)r=r>r?r&r�r Z	localnamerlrr@r
rrrBr�rCrCrCrDr�fs�r�c@s�eZdZUdZdZdZeed�dd�eed�dd�eed�dd	d�eed
�d	dd�eed�dd�eed
�dd�eed�dd�eed�dd�eed�ddd�eed�dd�d�
Ze	e
efed<ee
eeeeeeeeeeed�
Ze�e�edd�e�e�e�edd�e�e�d�	Ziid�Ze	e
e	e
eeffed<egZe e	e
e!fd�dd��Z"dBe
e
e
e#ed!d"�d#d$�Z$e e	e
e%fd�d%d&��Z&e
e
e
e
e#d!d'�d(d)�Z'e
d!d*�d+d,�Z(e)e
e	d!d-�d.d/�Z*dCe+e
e
e
e
e,e)ee
e!fd1�d2d3�Z-e+e
e.e
e
e/e0e1e0d4�d5d6�Z2e+e
e.e
e/e0e)ee
e0fd7�d8d9�Z3e.e
e
e4e0d:�d;d<�Z5e6ee
e
e
e
e
e,fd�d=d>�Z7e0e1e
d?�d@dA�Z8d!S)DrzPython language domain.rd�Python�function�funcrSr�rTr�r4�method�methzclass methodz
static method�	attributer�rM�_propr0�mod)
r�r�rTr4r�rLrNr�rMr0�object_types)
r�r�rTr4r�rLrNr�rMr0Z
currentmodule�	decoratorZdecoratormethodT)Z
fix_parens)	r�r�r�rT�constr�r�r�rS)�objectsr#�initial_datar�cCs|j�di�S)Nr��r�r"r�rCrCrDr��szPythonDomain.objectsFN)r�r:r9r;r�rKcCsj||jvrN|j|}|jr$|dur$n*|jdur6|r6dStjtd�||j|d�t|jj|||�|j|<dS)zQNote a python object for cross reference.

        .. versionadded:: 2.1
        FNzWduplicate object description of %s, other instance in %s, use :noindex: for one of themr�)r�r;r	r
r!r8r7r\)r�r�r:r9r;r��otherrCrCrDr�s


�zPythonDomain.note_objectcCs|j�di�S)Nr#r�r�rCrCrDr#�szPythonDomain.modules)r�r9rFrGrHrKcCst|jj||||�|j|<dS)zQNote a python module for cross reference.

        .. versionadded:: 2.1
        N)rEr\r8r#)r�r�r9rFrGrHrCrCrDrj�s
�zPythonDomain.note_module)r8rKcCsXt|j���D]\}}|j|kr|j|=qt|j���D]\}}|j|kr8|j|=q8dSrv)�listr�r�r8r#)r�r8r�rSr
r�rCrCrD�	clear_docs


zPythonDomain.clear_doc)r��	otherdatarKcCsX|d��D]\}}|j|vr||j|<q|d��D]\}}|j|vr6||j|<q6dS)Nr�r#)r�r8r�r#)r�r�r�r�rSr
r�rCrCrD�merge_domaindatas

zPythonDomain.merge_domaindatar)r\r
rr�r��
searchmoderKc
s�|dd�dkr|dd�}|s$gSg}d}|dk�r|durJt�j��n
��|���du�r�|r�|r�|d|d|}	|	�jvr��j|	j�vr�|	}|�s�|r�|d|�jvrڈj|d|j�vr�|d|}n@|�jvr��j|j�vr�|}n d|����fdd��jD�}n�|�jv�r.|}n�|dk�r<gS|�rd|d|�jv�rd|d|}nd|�r�|d|�jv�r�|d|}n<|�r�|�r�|d|d|�jv�r�|d|d|}|du�r�|�|�j|f�|S)	z�Find a Python object for "name", perhaps using the given module
        and/or classname.  Returns a list of (name, object entry) tuples.
        r�Nz()rMrLcs4g|],}|���r�j|j�vr|�j|f�qSrC)r�r�r:)rwZoname�ZobjtypesZ
searchnamer�rCrD�
<listcomp>;s
�z)PythonDomain.find_obj.<locals>.<listcomp>r�)r�r�Zobjtypes_for_roler�r:r�)
r�r\r
rr�r�r��matchesZnewnamer�rCr�rD�find_objsN


�
�
zPythonDomain.find_obj)r\�fromdocname�builderr�r[rqr�rKcCs>|�d�}|�d�}	|�d�r"dnd}
|�|||	|||
�}|sZ|dkrZ|�|||	|d|
�}|sz|dkrz|�|||	|d|
�}|s�dSt|�dkr�d	d
�|D�}t|�dkr�|}n*tjtd�|d�d
d�|D��dd|d�|d\}
}|ddk�r|�|||
|�St	|d�}|�r|j
}n|g}t|||d|d||
�SdS)Nr]r^rWrMrr�r�r�cSsg|]}|djs|�qS)rM)r;)rwrrCrCrDr�ir|z-PythonDomain.resolve_xref.<locals>.<listcomp>z5more than one target found for cross-reference %r: %sz, css|]}|dVqdS)rNrC)rwr�rCrCrDr{nr|z,PythonDomain.resolve_xref.<locals>.<genexpr>�refZpython)r�r�r�r�r0r`)rg�hasattrr�r�r	r
r!rT�_make_module_refnoder+r�r-)r�r\r�r�r�r[rqr�r
rUr�r�Z
canonicalsr�rSryr�rCrCrD�resolve_xrefPs8

�
�
zPythonDomain.resolve_xref)r\r�r�r[rqr�rKcCs�|�d�}|�d�}g}	|�||||dd�}
|
D]~\}}|ddkr`|	�d|�||||�f�q0t|d�}
|
rv|
j}n|g}|	�d|�|d�t|||d	|d||�f�q0|	S)
Nr]r^rMr�r0zpy:modr`zpy:r)rgr�r�r�r+r�Zrole_for_objtyper-)r�r\r�r�r[rqr�r
rUr�r�r�rSryr�rCrCrD�resolve_any_xrefs*

��
��zPythonDomain.resolve_any_xref)r�r�r�r�rKcCsb|j|}|}|jr"|d|j7}|jr4|td�7}|jrL|d|jd7}t|||j|j||�S)Nz: z
 (deprecated)z (r�)r#rFrHr rGr-r8r9)r�r�r�r�r�r0rXrCrCrDr��s
�z!PythonDomain._make_module_refnodeccs�|j��D]\}}||d|j|jdfVq
|j��D]J\}}|jdkr4|jrf|||j|j|jdfVq4|||j|j|jdfVq4dS)Nr0rrOrM)r#r�r8r9r�r:r;)r�r
r�ZrefnamerSrCrCrD�get_objects�s
zPythonDomain.get_objectsrpcCsD|�d�}|�d�}|�d�}|dur*dSd�td|||g��SdS)Nr]r^rIrL)rgrTr�)r�rqr
rUr[rCrCrD�get_full_qualified_name�s


z$PythonDomain.get_full_qualified_name)FN)r)9r=r>r?r&r�r�rr r�rr@rAr)r?rHrJrVrZr\rardrqr4r[rrrZrolesr�r
rr��indicesrMr7r�rBrrEr#rjr�rr�rr�r�rrrr	r�r�rr�rr�r�rCrCrCrDr�s�
����"����	
��8�/��"r)rxr\rqr�rKcCs�ttd�dd�}|�d�dkr"dS|�d�dvrB|�d	�d
krB|S|�d�dvr||�d	�}t�tt|d��rp|S||�r||SdS)z1Do not emit nitpicky warnings for built-in types.)r�rKcSs$|�d�r|�dd�d}|tjvS)NrPrLrM)rUrV�typing�__all__)r�rCrCrD�istyping�s
z"builtin_resolver.<locals>.istypingrerdNrY)rTrSrIrR)rTrSr�)r@rBrg�inspectZisclass�getattr�builtins)rxr\rqr�r�rIrCrCrD�builtin_resolver�s
r�)rxrKcCsL|�d�|�t�|�ddd�|�dt�|jdtdd�d	d
ddd�S)
Nzsphinx.directivesriFr\zobject-description-transformzmissing-referencei�)�priorityr6r�T)�versionZenv_versionZparallel_read_safeZparallel_write_safe)Zsetup_extensionZ
add_domainrZadd_config_valueZconnectrr�)rxrCrCrD�setup�s

�r�)F)NF)N)N)tr&r�r�r�r�r�r�rrrrrrrr	r
rrZdocutilsr
Zdocutils.nodesrrZdocutils.parsers.rstrZdocutils.parsers.rst.statesrZsphinxrZsphinx.addnodesrrrZsphinx.applicationrZsphinx.buildersrZsphinx.deprecationrrZsphinx.directivesrZsphinx.domainsrrrrZsphinx.environmentrZ
sphinx.localer r!Zsphinx.pycode.astr"r#r�Zsphinx.rolesr$Zsphinx.utilr%Zsphinx.util.docfieldsr&r'r(Zsphinx.util.docutilsr)Zsphinx.util.inspectr*Zsphinx.util.nodesr+r,r-Zsphinx.util.typingr.r/Z	getLoggerr=r	r��VERBOSEr�r-r7rEr@rBrZrnr�r�r�r�r�r�r�r�r�r)r4r?rHrJrVrZr[r\rarbrdrqrrrr�rr�r�rCrCrCrD�<module>s�
0
�
���v23>h&%?-3?H�

Youez - 2016 - github.com/yon3zu
LinuXploit