https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sphinx/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sphinx/__pycache__/parsers.cpython-310.pyc
o

�$�a;�@s�dZddlZddlmZmZmZmZmZmZddl	Z
ddlZ
ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZmZerRddlmZGdd
�d
e
jj�ZGdd�de
jjje�Zdddeeeffdd�Z dS)z�
    sphinx.parsers
    ~~~~~~~~~~~~~~

    A Base class for additional parsers.

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Any�Dict�List�Type�Union)�nodes)�states)�
StringList)�	Transform)�SmartQuotes)�RemovedInSphinx50Warning)�
append_epilog�prepend_prolog)�Sphinxc@s(eZdZdZd
dd�Zeddd	��ZdS)�Parsera�
    A base class of source parsers.  The additional parsers should inherit this class instead
    of ``docutils.parsers.Parser``.  Compared with ``docutils.parsers.Parser``, this class
    improves accessibility to Sphinx APIs.

    The subclasses can access the following objects and functions:

    self.app
        The application object (:class:`sphinx.application.Sphinx`)
    self.config
        The config object (:class:`sphinx.config.Config`)
    self.env
        The environment object (:class:`sphinx.environment.BuildEnvironment`)
    self.warn()
        Emit a warning. (Same as :meth:`sphinx.application.Sphinx.warn()`)
    self.info()
        Emit an info message. (Same as :meth:`sphinx.application.Sphinx.info()`)

    .. deprecated:: 1.6
       ``warn()`` and ``info()`` is deprecated.  Use :mod:`sphinx.util.logging` instead.
    .. deprecated:: 3.0
       parser.app is deprecated.
    �appr�returnNcCs||_|j|_|j|_dS)z�set_application will be called from Sphinx to set app and other instance variables

        :param sphinx.application.Sphinx app: Sphinx application object
        N)�_app�config�env)�selfr�r�0/usr/lib/python3/dist-packages/sphinx/parsers.py�set_application6szParser.set_applicationcCstjdtdd�|jS)Nzparser.app is deprecated.�)�
stacklevel)�warnings�warnr
r)rrrrr?sz
Parser.app)rrrN)rr)�__name__�
__module__�__qualname__�__doc__r�propertyrrrrrrs

	rcs`eZdZdZdeeef�fdd�Zdee	e
fdejddfdd	�Z
d
e
ddfdd�Z�ZS)
�	RSTParserzA reST parser for Sphinx.rcst���}|�t�|S)z�
        Sphinx's reST parser replaces a transform class for smart-quotes by its own

        refs: sphinx.io.SphinxStandaloneReader
        )�super�get_transforms�remover)r�
transforms��	__class__rrr&Hs

zRSTParser.get_transforms�inputstring�documentNcCs�|�||�tj|j|j|jjd�|_t|t	�r*t
jj||jj
dd�}t||j�}n|}|�|�|jj|||jd�|��dS)z(Parse text and generate a document tree.)�
state_classes�
initial_state�debugT)�	tab_width�convert_whitespace)�inlinerN)�setup_parser	�RSTStateMachiner-r.�reporter�
debug_flag�statemachine�
isinstance�str�docutils�string2lines�settingsr0r
�current_source�decorate�runr2�finish_parse)rr+r,�lines�
inputlinesrrr�parseRs �
�
zRSTParser.parse�contentcCs t||jj�t||jj�dS)z'Preprocess reST content before parsing.N)rr�
rst_prologr�
rst_epilog)rrDrrrr>hszRSTParser.decorate)rr r!r"rrrr&rr9r
rr,rCr>�
__classcell__rrr)rr$Es
 
r$rrrcCs|�t�dddd�S)N�builtinT)�version�parallel_read_safe�parallel_write_safe)�add_source_parserr$)rrrr�setupns

�rM)!r"r�typingrrrrrr�docutils.parsersr:�docutils.parsers.rstrr	�docutils.statemachiner
�docutils.transformsr�docutils.transforms.universalr�sphinx.deprecationr
�sphinx.util.rstrr�sphinx.applicationr�parsersr�rstr$r9rMrrrr�<module>s"
 ()

https://t.me/RX1948 - 2025