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

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

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

�ab�)�@s`dZddlZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZddl
mZddlmZmZddlmZddlmZdd	lmZmZdd
lmZddlmZmZmZddlmZdd
l m!Z!er�ddl"m#Z#e�$d�Z%e�$d�Z&e	d�Z'e(e)d�dd�Z*Gdd�deee'�Z+Gdd�de�Z,Gdd�de�Z-edde+ieddi�dee(efd�d d!�Z.dS)"z�
    sphinx.directives
    ~~~~~~~~~~~~~~~~~

    Handlers for additional ReST directives.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Any�Dict�Generic�List�Tuple�TypeVar�cast)�nodes)�Node)�
directives�roles)�addnodes)�desc_signature)�RemovedInSphinx50Warning�deprecated_alias)�docutils)�DocFieldTransformer�Field�
TypedField)�SphinxDirective)�
OptionSpec)�Sphinxz\\\nz\\(.)�T)�argument�returncCs,|durdSt|�}|dkr$td��|SdS)zS
    Check for an integer argument or None value; raise ``ValueError`` if not.
    Nrz(negative value; must be positive or zero)�int�
ValueError)r�value�r�>/usr/lib/python3.9/site-packages/sphinx/directives/__init__.py�optional_int%sr!c@seZdZUdZdZdZdZdZdej	iZ
eed<gZ
eeed<dZeed	<dZeed
<dZejed<iZeeeeeffed<eeeeeffd
�dd�Zeed
�dd�Zeeed�dd�Zeeedd�dd�Zdd
�dd�Z ej!dd�dd�Z"dd
�dd�Z#ee$d
�dd �Z%dS)!�ObjectDescriptionz�
    Directive to describe a class, function or similar object.  Not used
    directly, but subclassed (in domain-specific directives) to add custom
    behavior.
    T�r�noindex�option_spec�doc_field_typesN�domain�objtype�	indexnode�_doc_field_type_map�rcCsf|jikr`i|_|jD]H}|jD]}|df|j|<q |jrtt|�}|jD]}|df|j|<qJq|jS)NFT)r*r&�namesZis_typedr	rZ	typenames)�selfZfield�nameZtyped_fieldrrr �get_field_type_mapJs




z$ObjectDescription.get_field_type_mapcCs@t�d|jd��d�}|jjr.dd�|D�Sdd�|D�SdS)z�
        Retrieve the signatures to document from the directive arguments.  By
        default, signatures are given as arguments, one per line.
        �r�
cSsg|]}t�d|����qS)z\1)�strip_backslash_re�sub�strip��.0�linerrr �
<listcomp>`�z4ObjectDescription.get_signatures.<locals>.<listcomp>cSsg|]}|���qSr)r4r5rrr r8br9N)�nl_escape_rer3�	arguments�splitZconfig�strip_signature_backslash)r-�linesrrr �get_signaturesXsz ObjectDescription.get_signatures)�sig�signodercCst�dS)a�
        Parse the signature *sig* into individual nodes and append them to
        *signode*. If ValueError is raised, parsing is aborted and the whole
        *sig* is put into a single desc_name node.

        The return value should be a value that identifies the object.  It is
        passed to :meth:`add_target_and_index()` unchanged, and otherwise only
        used to skip duplicates.
        N)r)r-r@rArrr �handle_signatureds
z"ObjectDescription.handle_signature)r.r@rArcCsdS)z�
        Add cross-reference IDs and entries to self.indexnode, if applicable.

        *name* is whatever :meth:`handle_signature()` returned.
        Nr)r-r.r@rArrr �add_target_and_indexpsz&ObjectDescription.add_target_and_indexcCsdS)z�
        Called before parsing content. Used to set information about the current
        directive context on the build environment.
        Nr�r-rrr �before_contentxsz ObjectDescription.before_content)�contentnodercCsdS)z�
        Called after creating the content through nested parsing,
        but before the ``object-description-transform`` event is emitted,
        and before the info-fields are transformed.
        Can be used to manipulate the content.
        Nr)r-rFrrr �transform_contentsz#ObjectDescription.transform_contentcCsdS)z�
        Called after parsing content. Used to reset information about the
        current directive context on the build environment.
        NrrDrrr �
after_content�szObjectDescription.after_contentc	Cs�d|jvr"|j�dd�\|_|_nd|j|_|_tjgd�|_t��}|jj	|_	|j|d<|j|d<|d<d|j
v|d<}|jr�|d	�|j�|d	�|d�g|_|�
�}|D]�}t�|d�}|�|�|�|�z|�||�}Wn0t�y|��|t�||�7}Yq�Yn0||jvr�|j�|�|s�|�|||�q�t��}|�|�|j�rv|jd
|jjd<|��|j�|j|j|�|�|�|jj�d|j|j|�t|�� |�d
|jjd<|�!�|j|gS)a
        Main directive entry function, called by docutils upon encountering the
        directive.

        This directive is meant to be quite easily subclassable, so it delegates
        to several additional methods.  What it does:

        * find out if called as a domain-specific directive, set self.domain
        * create a `desc` node to fit all description inside
        * parse standard options, currently `noindex`
        * create an index node if needed as self.indexnode
        * parse all given signatures (as returned by self.get_signatures())
          using self.handle_signature(), which should either return a name
          or raise ValueError
        * add index entries using self.add_target_and_index()
        * parse the content and handle doc fields in it
        �:r#r0)�entriesr'r(Zdesctyper$�classesr�object�object-description-transformN)"r.r<r'r(r�indexr)Zdesc�stateZdocument�options�appendr,r?rZset_source_inforBr�clearZ	desc_namerC�desc_content�env�	temp_datarEZnested_parseZcontentZcontent_offsetrG�app�emitrZ
transform_allrH)r-Znoder$Z
signaturesr@rAr.rFrrr �run�sT










�zObjectDescription.run)&�__name__�
__module__�__qualname__�__doc__�has_content�required_arguments�optional_arguments�final_argument_whitespacer�flagr%r�__annotations__r&rrr'�strr(r)rrNr*rr�boolr/r?rrrBrCrErSrGrHrrXrrrr r"2s(
�	r"c@s*eZdZdZdZdZeed�dd�ZdS)�DefaultRolezK
    Set the default interpreted text role.  Overridden from docutils.
    r#Fr+cCs�|jst�d�gS|jd}t�||jj|j|jj	�\}}|rZt�
d|�||jjd<n8t
�|j|j�}|jj	}|jd|||jd�}||g7}ttt
j|�S)Nr0rZdefault_rolez#Unknown interpreted text role "%s".)r7)r;rZunregister_roler
�roleZ
state_machine�language�linenorO�reporterZ
register_rolerTrUr
�
literal_blockZ
block_text�errorr	rr)r-Z	role_namerf�messagesrjrirkrrr rX�s"


�
�
zDefaultRole.runN)	rYrZr[r\r_r`rrrXrrrr re�srec@s@eZdZUdZdZdZdZdZiZe	e
d<eed�dd�Z
d	S)
�
DefaultDomainzH
    Directive to (re-)set the default domain for this source file.
    Fr#rr%r+cCs(|jd��}|jj�|�|jjd<gS)NrZdefault_domain)r;�lowerrTZdomains�getrU)r-Zdomain_namerrr rXszDefaultDomain.runN)rYrZr[r\r]r^r_r`r%rrbrrrXrrrr rm�s
rmzsphinx.directivesZ
DescDirectivez#sphinx.directives.ObjectDescriptionr)rVrcCsT|�ddd�t�dt�t�dt�t�dt�t�dt�|�d�d	d
d
d�S)Nr=FrTzdefault-rolezdefault-domainZdescriberLrMZbuiltinT)�versionZparallel_read_safeZparallel_write_safe)Zadd_config_valuerZregister_directiverermr"Z	add_event)rVrrr �setups
�rq)/r\�re�typingrrrrrrrr	rr
Zdocutils.nodesrZdocutils.parsers.rstrr
ZsphinxrZsphinx.addnodesrZsphinx.deprecationrrZsphinx.utilZsphinx.util.docfieldsrrrZsphinx.util.docutilsrZsphinx.util.typingrZsphinx.applicationr�compiler:r2rrcrr!r"rermrqrrrr �<module>s<
(


)���

Youez - 2016 - github.com/yon3zu
LinuXploit