B
    \8(                 @   s  d Z ddlZddlmZ ddlmZ G dd deZG dd deZG d	d
 d
ej	ej
eZG dd dejej
ZG dd dejejejZG dd dejejejZG dd dejejejZeZG dd dejejejZG dd deZG dd dejejejZG dd dejejejZG dd dejejejZG dd dejejejZG dd  d ejejejZG d!d" d"ej	ej
ZG d#d$ d$ejejZG d%d& d&ejej
ZG d'd( d(ejej
Z G d)d* d*ejejejZ!G d+d, d,ej"Z"G d-d. d.ej#Z#G d/d0 d0e#Z$G d1d2 d2ej%ejejZ&G d3d4 d4ejejZ'G d5d6 d6ej
Z(G d7d8 d8ej
Z)G d9d: d:ej
Z*G d;d< d<ej+Z,G d=d> d>ej
Z-G d?d@ d@ej
Z.G dAdB dBej
Z/G dCdD dDej
Z0G dEdF dFej
Z1G dGdH dHej2ej3ej
Z4G dIdJ dJejej
Z5G dKdL dLej6Z7G dMdN dNej6Z8G dOdP dPej9eZ:G dQdR dRej;eZ<G dSdT dTejejZ=G dUdV dVejejZ>e?dWdX e@ A D  dS )Yz
    sphinx.addnodes
    ~~~~~~~~~~~~~~~

    Additional docutils nodes.

    :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)nodes)RemovedInSphinx30Warningc               @   s(   e Zd ZdZdd Zdd Zdd ZdS )	translatablea  Node which supports translation.

    The translation goes forward with following steps:

    1. Preserve original translatable messages
    2. Apply translated messages from message catalog
    3. Extract preserved messages (for gettext builder)

    The translatable nodes MUST preserve original messages.
    And these messages should not be overridden at applying step.
    Because they are used at final step; extraction.
    c             C   s   t dS )z(Preserve original translatable messages.N)NotImplementedError)self r   .lib/python3.7/site-packages/sphinx/addnodes.pypreserve_original_messages%   s    z'translatable.preserve_original_messagesc             C   s   t dS )zApply translated message.N)r   )r   original_messagetranslated_messager   r   r   apply_translated_message*   s    z%translatable.apply_translated_messagec             C   s   t dS )zjExtract translation messages.

        :returns: list of extracted messages or messages generator
        N)r   )r   r   r   r   extract_original_messages/   s    z&translatable.extract_original_messagesN)__name__
__module____qualname____doc__r	   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdZdS )not_smartquotablez+A node which does not support smart-quotes.FN)r   r   r   r   Zsupport_smartquotesr   r   r   r   r   8   s   r   c               @   s(   e Zd ZdZdd Zdd Zdd ZdS )	toctreez Node for inserting a "TOC tree".c             C   s   |  dr| d | d< d S )Ncaption
rawcaption)get)r   r   r   r   r	   @   s    
z"toctree.preserve_original_messagesc             C   s   |  d|kr|| d< d S )Nr   r   )r   )r   r
   r   r   r   r   r   E   s    z toctree.apply_translated_messagec             C   s   d| kr| d gS g S d S )Nr   r   )r   r   r   r   r   J   s    
z!toctree.extract_original_messagesN)r   r   r   r   r	   r   r   r   r   r   r   r   =   s   r   c               @   s   e Zd ZdZdS )desczNode for object descriptions.

    This node is similar to a "definition list" with one definition.  It
    contains one or more ``desc_signature`` and a ``desc_content``.
    N)r   r   r   r   r   r   r   r   r   T   s   r   c               @   s   e Zd ZdZdS )desc_signaturea%  Node for object signatures.

    The "term" part of the custom Sphinx definition list.

    As default the signature is a single line signature,
    but set ``is_multiline = True`` to describe a multi-line signature.
    In that case all child nodes must be ``desc_signature_line`` nodes.
    N)r   r   r   r   r   r   r   r   r   \   s   r   c               @   s   e Zd ZdZdS )desc_signature_linezNode for a line in a multi-line object signatures.

    It should only be used in a ``desc_signature`` with ``is_multiline`` set.
    Set ``add_permalink = True`` for the line that should get the permalink.
    N)r   r   r   r   r   r   r   r   r   g   s   r   c               @   s   e Zd ZdZdS )desc_addnamez9Node for additional name parts (module name, class name).N)r   r   r   r   r   r   r   r   r   q   s   r   c               @   s   e Zd ZdZdS )	desc_typez+Node for return types or object type names.N)r   r   r   r   r   r   r   r   r   y   s   r   c               @   s   e Zd ZdZdd ZdS )desc_returnsz4Node for a "returns" annotation (a la -> in Python).c             C   s   dt j|  S )Nz -> )r   TextElementastext)r   r   r   r   r      s    zdesc_returns.astextN)r   r   r   r   r   r   r   r   r   r   }   s   r   c               @   s   e Zd ZdZdS )	desc_namezNode for the main object name.N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdZdS )desc_parameterlistz"Node for a general parameter list.z, N)r   r   r   r   child_text_separatorr   r   r   r   r       s   r    c               @   s   e Zd ZdZdS )desc_parameterzNode for a single parameter.N)r   r   r   r   r   r   r   r   r"      s   r"   c               @   s   e Zd ZdZdZdd ZdS )desc_optionalz6Node for marking optional parts of the parameter list.z, c             C   s   dt j|  d S )N[])r   r   r   )r   r   r   r   r      s    zdesc_optional.astextN)r   r   r   r   r!   r   r   r   r   r   r#      s   r#   c               @   s   e Zd ZdZdS )desc_annotationz@Node for signature annotations (not Python 3-style annotations).N)r   r   r   r   r   r   r   r   r&      s   r&   c               @   s   e Zd ZdZdS )desc_contentzrNode for object description content.

    This is the "definition" part of the custom Sphinx definition list.
    N)r   r   r   r   r   r   r   r   r'      s   r'   c               @   s   e Zd ZdZdS )versionmodifiedzNode for version change entries.

    Currently used for "versionadded", "versionchanged" and "deprecated"
    directives.
    N)r   r   r   r   r   r   r   r   r(      s   r(   c               @   s   e Zd ZdZdS )seealsozCustom "see also" admonition.N)r   r   r   r   r   r   r   r   r)      s   r)   c               @   s   e Zd ZdZdS )productionlistzKNode for grammar production lists.

    Contains ``production`` nodes.
    N)r   r   r   r   r   r   r   r   r*      s   r*   c               @   s   e Zd ZdZdS )
productionz*Node for a single grammar production rule.N)r   r   r   r   r   r   r   r   r+      s   r+   c               @   s   e Zd ZdZdd ZdS )matha  Node for inline equations.

    .. warning:: This node is provided to keep compatibility only.
                 It will be removed in nearly future.  Don't use this from your extension.

    .. deprecated:: 1.8
       Use ``docutils.nodes.math`` instead.
    c             C   s<   |dkr*d| j kr*tjdtdd |  S tj| |S dS )z2Special accessor for supporting ``node['latex']``.latexzrmath node for Sphinx was replaced by docutils'. Therefore please use ``node.astext()`` to get an equation instead.   )
stacklevelN)
attributeswarningswarnr   r   r   r,   __getitem__)r   keyr   r   r   r3      s
    
zmath.__getitem__N)r   r   r   r   r3   r   r   r   r   r,      s   r,   c               @   s   e Zd ZdZdd ZdS )
math_blockzNode for block level equations.

    .. warning:: This node is provided to keep compatibility only.
                 It will be removed in nearly future.  Don't use this from your extension.

    .. deprecated:: 1.8
    c             C   s<   |dkr*d| j kr*tjdtdd |  S tj| |S d S )Nr-   zydisplaymath node for Sphinx was replaced by docutils'. Therefore please use ``node.astext()`` to get an equation instead.r.   )r/   )r0   r1   r2   r   r   r   r5   r3   )r   r4   r   r   r   r3      s
    
zmath_block.__getitem__N)r   r   r   r   r3   r   r   r   r   r5      s   r5   c               @   s   e Zd ZdZdS )displaymathzNode for block level equations.

    .. warning:: This node is provided to keep compatibility only.
                 It will be removed in nearly future.  Don't use this from your extension.

    .. deprecated:: 1.8
    N)r   r   r   r   r   r   r   r   r6      s   r6   c               @   s   e Zd ZdZdS )indexa  Node for index entries.

    This node is created by the ``index`` directive and has one attribute,
    ``entries``.  Its value is a list of 5-tuples of ``(entrytype, entryname,
    target, ignored, key)``.

    *entrytype* is one of "single", "pair", "double", "triple".

    *key* is categorization characters (usually a single character) for
    general index page. For the details of this, please see also:
    :rst:dir:`glossary` and issue #2320.
    N)r   r   r   r   r   r   r   r   r7      s   r7   c               @   s   e Zd ZdZdS )centeredzDeprecated.N)r   r   r   r   r   r   r   r   r8     s   r8   c               @   s   e Zd ZdZdS )ackszSpecial node for "acks" lists.N)r   r   r   r   r   r   r   r   r9     s   r9   c               @   s   e Zd ZdZdS )hlistzjNode for "horizontal lists", i.e. lists that should be compressed to
    take up less vertical space.
    N)r   r   r   r   r   r   r   r   r:     s   r:   c               @   s   e Zd ZdZdS )hlistcolz)Node for one column in a horizontal list.N)r   r   r   r   r   r   r   r   r;     s   r;   c               @   s   e Zd ZdZdS )compact_paragraphz<Node for a compact paragraph (which never makes a <p> node).N)r   r   r   r   r   r   r   r   r<     s   r<   c               @   s   e Zd ZdZdS )glossaryzNode to insert a glossary.N)r   r   r   r   r   r   r   r   r=     s   r=   c               @   s   e Zd ZdZdS )onlyzANode for "only" directives (conditional inclusion based on tags).N)r   r   r   r   r   r   r   r   r>     s   r>   c               @   s   e Zd ZdZdS )start_of_filezANode to mark start of a new file, used in the LaTeX builder only.N)r   r   r   r   r   r   r   r   r?   $  s   r?   c               @   s   e Zd ZdZdS )highlightlangzcInserted to set the highlight language and line number options for
    subsequent code blocks.
    N)r   r   r   r   r   r   r   r   r@   (  s   r@   c               @   s   e Zd ZdZdS )tabular_col_specz;Node for specifying tabular columns, used for LaTeX output.N)r   r   r   r   r   r   r   r   rA   .  s   rA   c               @   s   e Zd ZdZdS )metazYNode for meta directive -- same as docutils' standard meta node,
    but pickleable.
    N)r   r   r   r   r   r   r   r   rB   2  s   rB   c               @   s   e Zd ZdZdS )pending_xrefzNode for cross-references that cannot be resolved without complete
    information about all documents.

    These nodes are resolved before writing output, in
    BuildEnvironment.resolve_references.
    N)r   r   r   r   r   r   r   r   rC   :  s   rC   c               @   s   e Zd ZdZdS )number_referencez4Node for number references, similar to pending_xref.N)r   r   r   r   r   r   r   r   rD   C  s   rD   c               @   s   e Zd ZdZdS )download_referencez6Node for download references, similar to pending_xref.N)r   r   r   r   r   r   r   r   rE   G  s   rE   c               @   s   e Zd ZdZdS )literal_emphasisz{Node that behaves like `emphasis`, but further text processors are not
    applied (e.g. smartypants for HTML output).
    N)r   r   r   r   r   r   r   r   rF   K  s   rF   c               @   s   e Zd ZdZdS )literal_strongzyNode that behaves like `strong`, but further text processors are not
    applied (e.g. smartypants for HTML output).
    N)r   r   r   r   r   r   r   r   rG   Q  s   rG   c               @   s   e Zd ZdZdS )abbreviationz)Node for abbreviations with explanations.N)r   r   r   r   r   r   r   r   rH   W  s   rH   c               @   s   e Zd ZdZdS )manpagez Node for references to manpages.N)r   r   r   r   r   r   r   r   rI   [  s   rI   c             c   s&   | ]}|d kr|d dkr|V  qdS )r   r   _Nr   ).0kr   r   r   	<genexpr>a  s    rM   )Br   r1   Zdocutilsr   Zsphinx.deprecationr   objectr   r   ZGeneralZElementr   Z
Admonitionr   ZPartZInliner   r   ZFixedTextElementr   r   Zdesc_classnamer   r   r   r    r"   r#   r&   r'   r(   r)   r*   r+   r,   r5   r6   Z	Invisibler7   r8   r9   r:   r;   Z	paragraphr<   r=   r>   r?   r@   rA   SpecialZPreBibliographicrB   rC   Z	referencerD   rE   ZemphasisrF   ZstrongrG   rH   rI   Z_add_node_class_namesglobalskeysr   r   r   r   <module>
   s\   !
			