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__/__init__.cpython-39.pyc
a

�ab;<�@sdZddlZddlmZmZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZddlmZmZmZddlmZddlmZdd	lmZdd
lmZddl m!Z!ddl"m#Z#er�dd
l$m%Z%ddl&m'Z'Gdd�d�Z(Gdd�de�Z)Gdd�de�Z*Gdd�d�Z+dS)a'
    sphinx.domains
    ~~~~~~~~~~~~~~

    Support for domains, which are groupings of description directives
    and roles describing e.g. constructs of one programming language.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�ABC�abstractmethod)�
TYPE_CHECKING�Any�Callable�Dict�Iterable�List�
NamedTuple�Optional�Tuple�Type�Union�cast)�nodes)�Element�Node�system_message)�Inliner)�pending_xref)�SphinxError)�_)�XRefRole)�RoleFunction)�Builder)�BuildEnvironmentc@s,eZdZdZddiZeeedd�dd�ZdS)�ObjTypea3
    An ObjType is the description for a type of object that a domain can
    document.  In the object_types attribute of Domain subclasses, object type
    names are mapped to instances of this class.

    Constructor arguments:

    - *lname*: localized name of the type (do not include domain name)
    - *roles*: all the roles that can refer to an object of this type
    - *attrs*: object attributes -- currently only "searchprio" is known,
      which defines the object's priority in the full-text search index,
      see :meth:`Domain.get_objects()`.
    Z
searchprio�N)�lname�roles�attrs�returncOs(||_||_|j��|_|j�|�dS�N)rr�known_attrs�copyr �update)�selfrrr �r'�;/usr/lib/python3.9/site-packages/sphinx/domains/__init__.py�__init__3szObjType.__init__)�__name__�
__module__�__qualname__�__doc__r#�strrr)r'r'r'r(r s�rc@sFeZdZUeed<eed<eed<eed<eed<eed<eed<dS)	�
IndexEntry�nameZsubtype�docname�anchorZextraZ	qualifierZdescrN)r*r+r,r.�__annotations__�intr'r'r'r(r/:s
r/c	@sxeZdZUdZdZeed<dZeed<dZeed<ddd�dd	�Z	e
d
eeee
eee
efefd
�dd��ZdS)�Indexa�
    An Index is the description for a domain-specific index.  To add an index to
    a domain, subclass Index, overriding the three name attributes:

    * `name` is an identifier used for generating file names.
      It is also used for a hyperlink target for the index. Therefore, users can
      refer the index page using ``ref`` role and a string which is combined
      domain name and ``name`` attribute (ex. ``:ref:`py-modindex```).
    * `localname` is the section title for the index.
    * `shortname` is a short name for the index, for use in the relation bar in
      HTML output.  Can be empty to disable entries in the relation bar.

    and providing a :meth:`generate()` method.  Then, add the index class to
    your domain's `indices` list.  Extensions can add indices to existing
    domains using :meth:`~sphinx.application.Sphinx.add_index_to_domain()`.

    .. versionchanged:: 3.0

       Index pages can be referred by domain name and index name via
       :rst:role:`ref` role.
    Nr0�	localname�	shortname�Domain)�domainr!cCs.|jdus|jdur$td|jj��||_dS)Nz0Index subclass %s has no valid name or localname)r0r6r�	__class__r*r9)r&r9r'r'r(r)_s
�zIndex.__init__)�docnamesr!cCst�dS)a�Get entries for the index.

        If ``docnames`` is given, restrict to entries referring to these
        docnames.

        The return value is a tuple of ``(content, collapse)``:

        ``collapse``
          A boolean that determines if sub-entries should start collapsed (for
          output formats that support collapsing sub-entries).

        ``content``:
          A sequence of ``(letter, entries)`` tuples, where ``letter`` is the
          "heading" for the given ``entries``, usually the starting letter, and
          ``entries`` is a sequence of single entries. Each entry is a sequence
          ``[name, subtype, docname, anchor, extra, qualifier, descr]``. The
          items in this sequence have the following meaning:

          ``name``
            The name of the index entry to be displayed.

          ``subtype``
            The sub-entry related type. One of:

            ``0``
              A normal entry.
            ``1``
              An entry with sub-entries.
            ``2``
              A sub-entry.

          ``docname``
            *docname* where the entry is located.

          ``anchor``
            Anchor for the entry within ``docname``

          ``extra``
            Extra info for the entry.

          ``qualifier``
            Qualifier for the description.

          ``descr``
            Description for the entry.

        Qualifier and description are not rendered for some output formats such
        as LaTeX.
        N��NotImplementedError)r&r;r'r'r(�generatees4zIndex.generate)N)r*r+r,r-r0r.r3r6r7r)rrrr	r/�boolr>r'r'r'r(r5Ds
�r5c
@seZdZUdZdZdZiZeee	fe
d<iZeeefe
d<iZ
eeeeeffe
d<gZeeee
d<iZeeefe
d<iZeeeeeeffe
d<iZee
d	<ee
d
<dZdd
d�dd�Zd
d�dd�Zee	d
d�dd�Zeeed�dd�Z eeed�dd�Z!ed
d�dd�Z"eeed
d�d d!�Z#dee$j%d
d"�d#d$�Z&d
d�d%d&�Z'e(d
d'�d(d)�Z)ded*eee(e*ee*d+�d,d-�Z+ded*ee(e*eeee*fd.�d/d0�Z,e-eeeeeee.fd�d1d2�Z/d<e	e0ed4�d5d6�Z1eeed7�d8d9�Z2e*eed7�d:d;�Z3d
S)=r8a�
    A Domain is meant to be a group of "object" description directives for
    objects of a similar nature, and corresponding roles to create references to
    them.  Examples would be Python modules, classes, functions etc., elements
    of a templating language, Sphinx roles and directives, etc.

    Each domain has a separate storage for information about existing objects
    and how to reference them in `self.data`, which must be a dictionary.  It
    also must implement several functions that expose the object information in
    a uniform way to parts of Sphinx that allow the user to reference or search
    for objects in a domain-agnostic way.

    About `self.data`: since all object and cross-referencing information is
    stored on a BuildEnvironment instance, the `domain.data` object is also
    stored in the `env.domaindata` dict under the key `domain.name`.  Before the
    build process starts, every active domain is instantiated and given the
    environment object; the `domaindata` dict must then either be nonexistent or
    a dictionary whose 'version' key is equal to the domain class'
    :attr:`data_version` attribute.  Otherwise, `OSError` is raised and the
    pickled environment is discarded.
    ��object_types�
directivesr�indices�dangling_warnings�enumerable_nodes�initial_data�datarrN)�envr!cCs(||_i|_i|_i|_i|_t|j�|_t|j�|_t|j�|_t	|j
�|_
|j|jvr�t
|jt�sjJ�t�|j�}|j|d<||_|j|j<n,|j|j|_|jd|jkr�td|j��|j��D]D\}}|jD]}|j�|g��|�q�|j�r|jdnd|j|<q�|jj|_|jj|_dS)N�versionzdata of %r domain out of daterr@)rH�_role_cache�_directive_cache�
_role2type�
_type2role�dictrArBr�listrCr0Z
domaindata�
isinstancerFr$Zdeepcopy�data_versionrG�OSError�label�items�
setdefault�append�getZobjtypes_for_roleZrole_for_objtype)r&rHZnew_datar0�objZrolenamer'r'r(r)�s.


zDomain.__init__�r!cCs\ddlm}t||j�d��}|jD]2}|jr$|jr$d|j|jf}|�||d|j�q$dS)zSet up domain object.r)�StandardDomain�stdz%s-%sr@N)	Zsphinx.domains.stdrZrrHZ
get_domainrCr0r6Znote_hyperlink_target)r&rZr[�indexr1r'r'r(�setup�s
zDomain.setup)r0�objtyper!cCsP||j|<|jr"|jd|j|<n
d|j|<|jD]}|j�|g��|�q2dS)zAdd an object type.rr@N)rArrMrLrUrV)r&r0r^�roler'r'r(�add_object_type�s


zDomain.add_object_type)r0r!cs|��jvr�j�S��jvr"dSd�j�f�igfttttttttttt	tt
fd����fdd�
}|�j�<|S)z�Return a role adapter function that always gives the registered
        role its full name ('domain:name') as the first argument.
        N�%s:%s)�typ�rawtext�text�lineno�inliner�options�contentr!cs�j��||||||�Sr")r)rbrcrdrerfrgrh��fullnamer0r&r'r(�role_adapters�z!Domain.role.<locals>.role_adapter)rJrr0r.r4rrr	rrr)r&r0rkr'rir(r_�s


�

�
zDomain.rolecs\||jvr|j|S||jvr"dSd|j|f�|j|}G�fdd�d|�}||j|<|S)z�Return a directive adapter class that always gives the registered
        directive its full name ('domain:name') as ``self.name``.
        Nracs(eZdZeed���fdd�Z�ZS)z*Domain.directive.<locals>.DirectiveAdapterrYcs�|_t���Sr")r0�super�run�r&)r:rjr'r(rmsz.Domain.directive.<locals>.DirectiveAdapter.run)r*r+r,r	rrm�
__classcell__r'�rj)r:r(�DirectiveAdaptersrq)rKrBr0)r&r0Z
BaseDirectiverqr'rpr(�	directives




zDomain.directive)r1r!cCsdS)z?Remove traces of a document in the domain-specific inventories.Nr')r&r1r'r'r(�	clear_doc$szDomain.clear_doc)r;�	otherdatar!cCstd|j��dS)z�Merge in data regarding *docnames* from a different domaindata
        inventory (coming from a subprocess in parallel builds).
        zLmerge_domaindata must be implemented in %s to be able to do parallel builds!N)r=r:)r&r;rtr'r'r(�merge_domaindata(s�zDomain.merge_domaindata)rHr1�documentr!cCsdS)z7Process a document after it is read by the environment.Nr')r&rHr1rvr'r'r(�process_doc0szDomain.process_doccCsdS)z)Do consistency checks (**experimental**).Nr'rnr'r'r(�check_consistency5szDomain.check_consistency)�pnoder!cCsdS)zxProcess a pending xref created in a doc field.
        For example, attach information about the current scope.
        Nr')r&ryr'r'r(�process_field_xref9szDomain.process_field_xrefr)rH�fromdocname�builderrb�target�node�contnoder!cCsdS)aLResolve the pending_xref *node* with the given *typ* and *target*.

        This method should return a new node, to replace the xref node,
        containing the *contnode* which is the markup content of the
        cross-reference.

        If no resolution can be found, None can be returned; the xref node will
        then given to the :event:`missing-reference` event, and if that yields no
        resolution, replaced by *contnode*.

        The method can also raise :exc:`sphinx.environment.NoUri` to suppress
        the :event:`missing-reference` event being emitted.
        Nr')r&rHr{r|rbr}r~rr'r'r(�resolve_xref?szDomain.resolve_xref)rHr{r|r}r~rr!cCst�dS)a9Resolve the pending_xref *node* with the given *target*.

        The reference comes from an "any" or similar role, which means that we
        don't know the type.  Otherwise, the arguments are the same as for
        :meth:`resolve_xref`.

        The method must return a list (potentially empty) of tuples
        ``('domain:role', newnode)``, where ``'domain:role'`` is the name of a
        role that could have created the same reference, e.g. ``'py:func'``.
        ``newnode`` is what :meth:`resolve_xref` would return.

        .. versionadded:: 1.3
        Nr<)r&rHr{r|r}r~rr'r'r(�resolve_any_xrefQszDomain.resolve_any_xrefcCsgS)auReturn an iterable of "object descriptions".

        Object descriptions are tuples with six items:

        ``name``
          Fully qualified name.

        ``dispname``
          Name to display when searching/linking.

        ``type``
          Object type, a key in ``self.object_types``.

        ``docname``
          The document where it is to be found.

        ``anchor``
          The anchor name for the object.

        ``priority``
          How "important" the object is (determines placement in search
          results). One of:

          ``1``
            Default priority (placed before full-text matches).
          ``0``
            Object is important (placed before default-priority objects).
          ``2``
            Object is unimportant (placed after full-text matches).
          ``-1``
            Object should not show up in search at all.
        r'rnr'r'r(�get_objectscs!zDomain.get_objectsF)�type�primaryr!cCs|r
|jStd�|j|jfS)z#Return full name for given ObjType.z%s %s)rrrS)r&r�r�r'r'r(�
get_type_name�szDomain.get_type_name)r~r!cCs|j�|jd�\}}|S)z,Get type of enumerable nodes (experimental).)NN)rErWr:)r&r~Zenum_node_typerr'r'r(�get_enumerable_node_type�szDomain.get_enumerable_node_typecCsdS)z*Return full qualified name for given node.Nr')r&r~r'r'r(�get_full_qualified_name�szDomain.get_full_qualified_name)F)4r*r+r,r-r0rSrArr.rr3rBrrrrrrCr	r
r5rDrErrrrFrQr)r]r`rr_rrrsrurrvrwrxrrzrr�r�rr4r�r?r�r�r�r'r'r'r(r8�sH
 ���"#r8),r-r$�abcrr�typingrrrrrr	r
rrr
rrZdocutilsrZdocutils.nodesrrrZdocutils.parsers.rst.statesrZsphinx.addnodesrZ
sphinx.errorsrZ
sphinx.localerZsphinx.rolesrZsphinx.util.typingrZsphinx.buildersrZsphinx.environmentrrr/r5r8r'r'r'r(�<module>s$8
X

Youez - 2016 - github.com/yon3zu
LinuXploit