o $axE @sdZddlmZmZmZmZmZddlmZddl m Z er$ddl m Z Gdddej Z Gdd d ejZGd d d ZGd d d ejej eZGdddej eZGdddejej ZGdddeejejejZGdddejejejZGdddejej ZGdddeejejZGdddeejejejZGdddeejejejZeZ GdddejejejZ!Gd d!d!e!Z"Gd"d#d#ejejejZ#Gd$d%d%ejejejZ$Gd&d'd'ejejejZ%Gd(d)d)ejejejZ&Gd*d+d+ej'eZ(Gd,d-d-e(Z)Gd.d/d/e(Z*Gd0d1d1e(Z+Gd2d3d3e(Z,Gd4d5d5e(Z-Gd6d7d7e(Z.Gd8d9d9e(Z/Gd:d;d;e(Z0Gdd?d?ejejZ3Gd@dAdAejej Z4GdBdCdCejej Z5GdDdEdEejejejZ6GdFdGdGej7ejejZ8GdHdIdIejejZ9GdJdKdKej Z:GdLdMdMej Z;GdNdOdOej ZGdRdSdSej Z?GdTdUdUej Z@GdVdWdWej ZAGdXdYdYej ZBGdZd[d[ej ZCGd\d]d]ejDejEej ZFGd^d_d_ejej ZGGd`dadaejejZHGdbdcdcejIZJGdddedeejIZKGdfdgdgejLeZMGdhdidiejNeZOGdjdkdkejejZPdldmdneeQeffdodpZRdqS)rz sphinx.addnodes ~~~~~~~~~~~~~~~ Additional docutils nodes. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. ) TYPE_CHECKINGAnyDictListSequence)nodes)Element)Sphinxc s8eZdZdZ  d dedededeffdd ZZS) documentajThe document root element patched by Sphinx. This fixes that document.set_id() does not support a node having multiple node Ids. see https://sourceforge.net/p/docutils/patches/167/ .. important:: This is only for Sphinx internal use. Please don't use this in your extensions. It will be removed without deprecation period. Nnodemsgnodesuggested_prefixreturncsfddlm}|jdkrt|||}nt||}|jdkr1|dD] }||jvr0||j|<q$|S)Nrdocutils)r)rids) sphinx.utilr__version_info__superset_idr)selfr r rrretnode_id __class__1/usr/lib/python3/dist-packages/sphinx/addnodes.pyrs      zdocument.set_id)Nr )__name__ __module__ __qualname____doc__rstrr __classcell__rrrrr s  r c@BeZdZdZd ddZdededdfdd Zdeefd d ZdS) translatableaNode 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. rNcCt)z(Preserve original translatable messages.NotImplementedErrorrrrrpreserve_original_messages=z'translatable.preserve_original_messagesoriginal_messagetranslated_messagecCr()zApply translated message.r))rr.r/rrrapply_translated_messageAr-z%translatable.apply_translated_messagecCr()zjExtract translation messages. :returns: list of extracted messages or messages generator r)r+rrrextract_original_messagesEsz&translatable.extract_original_messagesrN) r r!r"r#r,r$r0rr1rrrrr'/s  r'c@eZdZdZdZdS)not_smartquotablez+A node which does not support smart-quotes.FN)r r!r"r#support_smartquotesrrrrr4Msr4c@r&) toctreez Node for inserting a "TOC tree".rNcCsJ|dg}|dD] \}}|r||q |dr#|d|d<dSdS)N rawentriesentriescaption rawcaption) setdefaultappendget)rr7titledocnamerrrr,Us   z"toctree.preserve_original_messagesr.r/cCsPt|dD]\}\}}||kr||f|d|<q|d|kr&||d<dSdS)Nr8r:r9) enumerater=)rr.r/ir>r?rrrr0`s z toctree.apply_translated_messagecCs0g}||dgd|vr||d|S)Nr7r:)extendr=r<)rmessagesrrrr1js z!toctree.extract_original_messagesr2) r r!r"r#r,r$r0rr1rrrrr6Rs    r6cs@eZdZUdZgZeeed<dededdffdd Z Z S) _desc_classes_injectorz_Helper base class for injecting a fixes list of classes. Use as the first base class. classesargskwargsrNcs&tj|i||d|jdSNrEr__init__rBrE)rrFrGrrrrJsz_desc_classes_injector.__init__) r r!r"r#rErr$__annotations__rrJr%rrrrrDzs "rDc@eZdZdZdS)descamNode for a list of object signatures and a common description of them. Contains one or more :py:class:`desc_signature` nodes and then a single :py:class:`desc_content` node. This node always has two classes: - The name of the domain it belongs to, e.g., ``py`` or ``cpp``. - The name of the object type in the domain, e.g., ``function``. Nr r!r"r#rrrrrMrMcs,eZdZdZddgZefddZZS)desc_signatureaSNode for a single object signature. As default the signature is a single-line signature. Set ``is_multiline = True`` to describe a multi-line signature. In that case all child nodes must be :py:class:`desc_signature_line` nodes. This node always has the classes ``sig``, ``sig-object``, and the domain it belongs to. sigz sig-objectcs|drdStjS)N is_multiline )r=rchild_text_separatorr+rrrrTs z#desc_signature.child_text_separator)r r!r"r#rEpropertyrTr%rrrrrPs  rPc@r3)desc_signature_linezNode for a line in a multi-line object signature. It should only be used as a child of a :py:class:`desc_signature` with ``is_multiline`` set to ``True``. Set ``add_permalink = True`` for the line that should get the permalink. r N)r r!r"r#sphinx_line_typerrrrrVrVc@rL) desc_contentzfNode for object description content. Must be the last child node in a :py:class:`desc` node. NrNrrrrrYrOrYcs:eZdZdZddgZdedededdffd d ZZS) desc_inlinezNode for a signature fragment in inline text. This is for example used for roles like :rst:role:`cpp:expr`. This node always has the classes ``sig``, ``sig-inline``, and the name of the domain it belongs to. rQz sig-inlinedomainrFrGrNcs$tj|i||d|dSrH)rrJr<)rr[rFrGrrrrJszdesc_inline.__init__) r r!r"r#rEr$rrJr%rrrrrZs&rZc@eZdZdZddgZdS) desc_namezNode for the main object name. For example, in the declaration of a Python class ``MyModule.MyClass``, the main name is ``MyClass``. This node always has the class ``sig-name``. zsig-namedescnameNr r!r"r#rErrrrr]s r]c@r\) desc_addnamezNode for additional name parts for an object. For example, in the declaration of a Python class ``MyModule.MyClass``, the additional name part is ``MyModule.``. This node always has the class ``sig-prename``. z sig-prename descclassnameNr_rrrrr`s r`c@rL) desc_typez+Node for return types or object type names.NrNrrrrrbrOrbcs&eZdZdZdeffdd ZZS) desc_returnsz4Node for a "returns" annotation (a la -> in Python).rcsdtS)Nz -> rastextr+rrrreszdesc_returns.astext)r r!r"r#r$rer%rrrrrcsrccs$eZdZdZdZfddZZS)desc_parameterlistz"Node for a general parameter list., csdtS)Nz({}))formatrrer+rrrreszdesc_parameterlist.astext)r r!r"r#rTrer%rrrrrfsrfc@rL)desc_parameterzNode for a single parameter.NrNrrrrrirOrics*eZdZdZdZdeffdd ZZS) desc_optionalz6Node for marking optional parts of the parameter list.rgrcsdtdS)N[]rdr+rrrre szdesc_optional.astext)r r!r"r#rTr$rer%rrrrrjsrjc@rL)desc_annotationz@Node for signature annotations (not Python 3-style annotations).NrNrrrrrm rOrmc sJeZdZUdZgZeeed<d dededede dd f fd d Z Z S) desc_sig_elementzeZdZdZdgZd dedededed d f fd d ZZ S)desc_sig_spacez Node for a space in a signature.wr rSrorprqrrrNcs tj||g|Ri|dS)N)rrJrsrrrrJ)s zdesc_sig_space.__init__)r rS) r r!r"r#rEr$rrrJr%rrrrrt%s rtc@eZdZdZdgZdS) desc_sig_namez&Node for an identifier in a signature.nNr_rrrrrw. rwc@rv)desc_sig_operatorz$Node for an operator in a signature.oNr_rrrrrz3ryrzc@rv)desc_sig_punctuationz$Node for punctuation in a signature.pNr_rrrrr|8ryr|c@rv)desc_sig_keywordz*Node for a general keyword in a signature.kNr_rrrrr~=ryr~c@rv)desc_sig_keyword_typez;Node for a keyword which is a built-in type in a signature.ktNr_rrrrrBryrc@rv)desc_sig_literal_numberz*Node for a numeric literal in a signature.mNr_rrrrrGryrc@rv)desc_sig_literal_stringz)Node for a string literal in a signature.sNr_rrrrrLryrc@rv)desc_sig_literal_charz,Node for a character literal in a signature.scNr_rrrrrQryrc@rL)versionmodifiedzNode for version change entries. Currently used for "versionadded", "versionchanged" and "deprecated" directives. NrNrrrrrarOrc@rL)seealsozCustom "see also" admonition.NrNrrrrrirOrc@rL)productionlistzKNode for grammar production lists. Contains ``production`` nodes. NrNrrrrrmrOrc@rL) productionz*Node for a single grammar production rule.NrNrrrrrtrOrc@rL)indexaNode 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. NrNrrrrrzrOrc@rL)centeredz Deprecated.NrNrrrrrrOrc@rL)ackszSpecial node for "acks" lists.NrNrrrrrrOrc@rL)hlistzjNode for "horizontal lists", i.e. lists that should be compressed to take up less vertical space. NrNrrrrrrOrc@rL)hlistcolz)Node for one column in a horizontal list.NrNrrrrrrOrc@rL)compact_paragraphz node).NrNrrrrrrOrc@rL)glossaryzNode to insert a glossary.NrNrrrrrrOrc@rL)onlyzANode for "only" directives (conditional inclusion based on tags).NrNrrrrrrOrc@rL) start_of_filezANode to mark start of a new file, used in the LaTeX builder only.NrNrrrrrrOrc@rL) highlightlangzcInserted to set the highlight language and line number options for subsequent code blocks. NrNrrrrrrOrc@rL)tabular_col_specz;Node for specifying tabular columns, used for LaTeX output.NrNrrrrrrOrc@seZdZdZdZdS)metazYNode for meta directive -- same as docutils' standard meta node, but pickleable. N)r r!r"r# rawcontentrrrrrsrc@r3) 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. r N)r r!r"r#rTrrrrrrXrc@rL)pending_xref_conditiona}Node for cross-references that are used to choose appropriate content of the reference by conditions on the resolving phase. When the :py:class:`pending_xref` node contains one or more **pending_xref_condition** nodes, the cross-reference resolver should choose the content of the reference using defined conditions in ``condition`` attribute of each pending_xref_condition nodes:: StringIO io.StringIO After the processing of cross-reference resolver, one of the content node under pending_xref_condition node is chosen by its condition and to be removed all of pending_xref_condition nodes:: # When resolved the cross-reference successfully StringIO # When resolution is failed io.StringIO .. note:: This node is only allowed to be placed under pending_xref node. It is not allows to place it under other nodes. In addition, pending_xref node must contain only pending_xref_condition nodes if it contains one or more pending_xref_condition nodes. The pending_xref_condition node should have **condition** attribute. Domains can be store their individual conditions into the attribute to filter contents on resolving phase. As a reserved condition name, ``condition="*"`` is used for the fallback of resolution failure. Additionally, as a recommended condition name, ``condition="resolved"`` is used for the representation of resolstion success in the intersphinx module. .. versionadded:: 4.0 NrNrrrrrrOrc@rL)number_referencez4Node for number references, similar to pending_xref.NrNrrrrrrOrc@rL)download_referencez6Node for download references, similar to pending_xref.NrNrrrrrrOrc@rL)literal_emphasisz{Node that behaves like `emphasis`, but further text processors are not applied (e.g. smartypants for HTML output). NrNrrrrrrOrc@rL)literal_strongzyNode that behaves like `strong`, but further text processors are not applied (e.g. smartypants for HTML output). NrNrrrrrrOrc@rL)manpagez Node for references to manpages.NrNrrrrrrOrappr rcCsddlm}|t|t|t|t|t|t|t |t |t |t |t |t|t|ttD]}||qN|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t |t!|t"|t#|t$|t%|t&|j'dkr|t(ddddS)Nrr)rbuiltinT)versionparallel_read_safeparallel_write_safe))rradd_noder6rMrPrVrYrZr]r`rbrcrfrirjrm SIG_ELEMENTSrrrrrrrrrrrrrrrrrrrrrrr)rrrxrrrsetupsX                                       rN)Sr#typingrrrrrrrdocutils.nodesrsphinx.applicationr r Noder'r4Generalr6rD AdmonitionrMPartInline TextElementrPFixedTextElementrVrYrZr]r`desc_classnamerbrcrfrirjrminlinernrtrwrzr|r~rrrrrrrrr Invisiblerrrrr paragraphrrrrrrSpecialPreBibliographicrrr referencerremphasisrstrongrrr$rrrrrs   (         0