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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/__pycache__/roles.cpython-39.opt-1.pyc
a

�ab"6�@s�UdZddlZddlmZmZmZmZmZmZddl	m
Z
mZddlm
Z
mZmZmZddlmZddlmZmZddlmZdd	lmZmZdd
lmZer�ddlmZddlm Z ej!e
j"e
j#ej$ej!ej%ej$ej$ej!e
j#d
�
Z&Gdd�de�Z'Gdd�de'�Z(Gdd�de�Z)Gdd�de�Z*e�+d�Z,Gdd�de�Z-Gdd�de-�Z.e�+d�Z/e�+d�Z0Gdd�de�Z1e�+dej2�Z3Gd d!�d!e�Z4e'ej5d"�e(d#d$�e)�e*�e-�e.�e1�e1�e4�d%�	Z6ee7efe8d&<d'ee7efd(�d)d*�Z9dS)+z�
    sphinx.roles
    ~~~~~~~~~~~~

    Handlers for additional ReST roles.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Any�Dict�List�Tuple�Type)�nodes�utils)�Element�Node�TextElement�system_message)�addnodes)�_�__)�ws_re)�
ReferenceRole�
SphinxRole)�RoleFunction)�Sphinx)�BuildEnvironment)
ZcommandZdfnZkbdZ
mailheaderZmakevar�manpageZmimetypeZ	newsgroupZprogramZregexpcseZdZUdZejZeee	d<e
jZee
e	d<deeeeee
edd��fdd�
Zeeeeefd	�d
d�Zeeeeefd�d
d�Zeeeeefd�dd�Zeeeeefd�dd�Zdeeeeeeefd�dd�Ze
jdeeeeeeefd�dd�Z�ZS)�XRefRoleaA
    A generic cross-referencing role.  To create a callable that can be used as
    a role function, create an instance of this class.

    The general features of this role are:

    * Automatic creation of a reference and a content node.
    * Optional separation of title and target with `title <target>`.
    * The implementation is a class rather than a function to make
      customization easier.

    Customization can be done in two ways:

    * Supplying constructor parameters:
      * `fix_parens` to normalize parentheses (strip from target, and add to
        title if configured)
      * `lowercase` to lowercase the target
      * `nodeclass` and `innernodeclass` select the node classes for
        the reference and the content node

    * Subclassing and overwriting `process_link()` and/or `result_nodes()`.
    �	nodeclass�innernodeclassFN)�
fix_parens�	lowercaserr�
warn_dangling�returncs<||_||_||_|dur ||_|dur.||_t���dS�N)rrrrr�super�__init__)�selfrrrrr��	__class__��0/usr/lib/python3.9/site-packages/sphinx/roles.pyr!GszXRefRole.__init__)�title�targetrcCsJ|js,|�d�r|dd�}|jjr,|d7}|�d�rB|dd�}||fS)Nz()���)�has_explicit_title�endswithZconfigZadd_function_parentheses)r"r'r(r%r%r&�update_title_and_targetTs

z XRefRole.update_title_and_target�rcCsrd|jvr(d|j|_|_d|jg|_n0|j�dd�\|_|_d|jd|j|jfg|_|jrf|��S|��SdS)N�:�Zxref�z%s-%s)�name�	refdomain�reftype�classes�splitZdisabled�create_non_xref_node�create_xref_node�r"r%r%r&�runas
zXRefRole.runcCs\t�|jdd��}|jr0d|_|�|d�\}}|j|j||jd�}|j	|j
j|j|dd�S)Nr0Fr/�r4��is_ref)
r	Zunescape�textrr*r,r�rawtextr4�result_nodes�inliner�document�env)r"r=r(�noder%r%r&r6nszXRefRole.create_non_xref_nodecCs�|j}|j}|jr|��}|jr0|�||�\}}|jj|j|j	|j
|jd�}|j|j
fi|��}|�|�|�|j||j
||�\}}||d<||j|j
||jd�7}|j|jj|j|dd�S)N)Zrefdocr2r3ZrefexplicitZrefwarnZ	reftargetr:Tr;)r(r'r�lowerrr,rBZdocnamer2r3r*rrr>Zset_source_info�process_linkrr4r?r@rA)r"r(r'�options�refnoder%r%r&r7ws(�
�zXRefRole.create_xref_noder�rBrGr*r'r(rcCs|t�d|�fS)z�Called after parsing title and target text, and creating the
        reference node (given in *refnode*).  This method can alter the
        reference node and must return a new (or the same) ``(title, target)``
        tuple.
        � )r�sub)r"rBrGr*r'r(r%r%r&rE�szXRefRole.process_link)rArBrCr<rcCs
|ggfS)a(Called before returning the finished nodes.  *node* is the reference
        node if one was created (*is_ref* is then true), else the content node.
        This method can add other nodes and must return a ``(nodes, messages)``
        tuple (the usual return value of a role function).
        r%)r"rArBrCr<r%r%r&r?�szXRefRole.result_nodes)FFNNF)�__name__�
__module__�__qualname__�__doc__rZpending_xrefrrr
�__annotations__r�literalrr�boolr!�strrr,rrr
r9r6r7rErAr?�
__classcell__r%r%r#r&r,s(
��


	�	�rcs4eZdZdeeeeeeefd��fdd�Z�ZS)�AnyXRefRolerrHcs&t��|||||�}|j�|j�|Sr)r rEZ
attributes�updateZref_context)r"rBrGr*r'r(�resultr#r%r&rE�szAnyXRefRole.process_link)	rKrLrMr
rQrRrrErSr%r%r#r&rT�s�rTc@s8eZdZeeeeefd�dd�Zed�dd�Z	dS)�PEPr-c
Csd|j�d�}dtd�|j|ddfg}tj|d�}tjdd|gd�}|jj�	|�zX|�
�}tjddd|d	gd
�}|jr�|t�
|j|j�7}nd|j}|t�
||�7}WnRt�y|jjjtd�|j|jd
�}|j�|j|j|�}	|	g|gfYS0|||ggfS)N�index-%s�index�singlez$Python Enhancement Proposals; PEP %sr/��entries�ZidsF�pep�Zinternal�refurir4zPEP zinvalid PEP number %s��line)rB�new_serialnorr(rrYrr@rA�note_explicit_target�	build_uri�	referencer*�strongr'�
ValueError�reporter�errorr�lineno�problematicr>�
r"Z	target_idr\rYr(r`rfr'�msgZprbr%r%r&r9�s*�
�zPEP.runcCsZ|jjjj}|j�dd�}t|�dkrB|dt|d�|dfS|dt|d�SdS)N�#r0�zpep-%04d#%srzpep-%04d)r@rA�settingsZpep_base_urlr(r5�len�int�r"Zbase_url�retr%r%r&re�s
z
PEP.build_uriN�
rKrLrMrrrr
r9rRrer%r%r%r&rW�srWc@s8eZdZeeeeefd�dd�Zed�dd�Z	dS)�RFCr-c
Cs
d|j�d�}dd|j|ddfg}tj|d�}tjdd|gd�}|jj�|�zX|�	�}tj
ddd|d	gd
�}|jr�|t�|j
|j
�7}nd|j
}|t�||�7}WnPty�|jjjtd�|j|jd
�}|j�|j|j|�}	|	g|gfYS0|||ggfS)NrXrYrZzRFC; RFC %sr/r[r]F�rfcr_zRFC zinvalid RFC number %sra)rBrcr(rrYrr@rArdrerfr*rgr'rhrirjrrkrlr>rmr%r%r&r9�s&
�zRFC.runcCsf|jjjj}|j�dd�}t|�dkrJ||jjt|d�d|dS||jjt|d�SdS)Nror0rpr)	r@rArqZrfc_base_urlr(r5rrZrfc_urlrsrtr%r%r&re�s
$z
RFC.build_uriNrvr%r%r%r&rw�srw�(?<!&)&(?![&\s])c@s4eZdZe�d�Zeeeee	fd�dd�Z
dS)�GUILabelryr-cCs�tj|j|jgd�}|j�|j�}|t�|�d��7}|D]P}|�	dd�}t�|d�}tjdd|dgd�}||7}|t�|dd��7}q:|ggfS)	N)r>r4rz&&�&r/�acceleratorr:r0)
rZinliner>r1�amp_rer5r=�Text�pop�replace)r"rCZspans�spanZletterr|r%r%r&r9�szGUILabel.runN)rKrLrM�re�compiler}rrrr
r9r%r%r%r&rz�s
rzcs6eZdZdZeeeeefd��fdd�Z�Z	S)�
MenuSelectionu‣r-cs|j�d|j�|_t���S)Nz-->)r=r��BULLET_CHARACTERr r9r8r#r%r&r9szMenuSelection.run)
rKrLrMr�rrrr
r9rSr%r%r#r&r�sr�z	{([^}]+)}z(\\*{|\\*})c@sHeZdZe�d�Zeeeee	fd�dd�Z
eeed�dd�ZdS)	�EmphasizedLiteralz(\\\\|\\{|\\}|{|})r-cCs>|�|j�}tj|jdg|�R|j��|jgd��}|ggfS)Nr/)�roler4)�parser=rrPr>r1rD)r"ZchildrenrCr%r%r&r9s
�zEmphasizedLiteral.run)r=rcCs�g}dg}|j�|�D�]<}|dkr6|dd7<q|dkr~t|�dkrh|ddkrh|dd7<n|�d�|�d�q|dk�rt|�d	kr�|d
dkr�t|d�dkr�|dr�|�t�|d|d��|�t�|d|d��dg}n|�d�d�|�g}q|dk�r(|dd7<q|d
k�rD|dd7<q|d|7<qd�|��r~d�|�}|�t�||��|S)Nr/z\\����\�{rpr)�}�r0rz\{z\})�	parens_rer5rr�appendrr~�emphasis�join)r"r=rV�stack�partr%r%r&r�s6

(



zEmphasizedLiteral.parseN)
rKrLrMr�r�r�rrrr
r9rRr�r%r%r%r&r�s
r��	\((.*)\)$c@s8eZdZe�dej�Zeee	ee
fd�dd�ZdS)�Abbreviationr�r-cCsd|j��}|j�|j�}|rB|jd|�����}|�d�|d<n|j}tj	|j
|fi|��ggfS)Nr0Zexplanation)rF�copy�abbr_re�searchr=�start�strip�grouprZabbreviationr>)r"rFZmatchedr=r%r%r&r9Ls
zAbbreviation.runN)rKrLrMr�r��Sr�rrrr
r9r%r%r%r&r�Isr�)rT)r)	Zdownload�anyr^rxZguilabelZ
menuselection�fileZsampZabbr�specific_docrolesr)�apprcCstddlm}t��D]4\}}|�||�}|�||d|gi�}|�||�qt��D]\}}|�||�qRdddd�S)Nr)�rolesr4ZbuiltinT)�versionZparallel_read_safeZparallel_write_safe)Zdocutils.parsers.rstr��generic_docroles�itemsZGenericRoleZ
CustomRoleZregister_local_roler�)r�r�ZrolenamerZgenericr��funcr%r%r&�setuphs�r�):rNr��typingrrrrrrZdocutilsrr	Zdocutils.nodesr
rrr
ZsphinxrZ
sphinx.localerrZsphinx.utilrZsphinx.util.docutilsrrZsphinx.util.typingrZsphinx.applicationrZsphinx.environmentrZliteral_strongr�rPZliteral_emphasisrr�rrTrWrwr�Z_amp_rerzr�Z
_litvar_rer�r�r�Z_abbr_rer�Zdownload_referencer�rRrOr�r%r%r%r&�<module>s\
 �y	#"


2
�

Youez - 2016 - github.com/yon3zu
LinuXploit