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__/io.cpython-310.pyc
o

�$�a��@s�dZddlZddlmZmZmZmZddlmZddl	m
Z
ddlmZddl
mZmZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlm Z ddl!m"Z"m#Z#m$Z$m%Z%ddl&m'Z'm(Z(m)Z)ddl*m+Z+ddl,m-Z-m.Z.m/Z/ddl0m1Z1ddl2m3Z3er�ddl4m5Z5e/�6e7�Z8Gdd�dej9�Z:Gdd�de:�Z;Gdd�de:�Z<Gdd�de�Z=deded ed!efd"d#�Z>Gd$d%�d%e�Z?d&d'd(e d)e@d!ejAfd*d+�ZBdS),z�
    sphinx.io
    ~~~~~~~~~

    Input/Output files

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Any�List�Type)�nodes)�	Publisher)�Values)�	FileInput�Input�
NullOutput)�Parser)�
standalone)�	Transform)�DanglingReferences)�UnfilteredWriter)�addnodes)�BuildEnvironment)�AutoIndexUpgrader�DoctreeReadEvent�
FigureAligner�SphinxTransformer)�Locale�PreserveTranslatableMessages�RemoveTranslatableInline)�
SphinxDomains)�UnicodeDecodeErrorHandler�get_filetype�logging)�LoggingReporter)�UIDTransform��Sphinxcs|eZdZUdZgZeeeed<de	de	ddf�fdd�Z
ddd�Zdeeef�fd
d�Zde
jf�fdd�Z�ZS)�SphinxBaseReaderzm
    A base class of readers for Sphinx.

    This replaces reporter by Sphinx's on generating document.
    �
transforms�args�kwargs�returnNcs\ddlm}t|�dkr#t|d|�r#|d|_|jj|_|dd�}t�j|i|��dS)Nrr �)	�sphinx.applicationr!�len�
isinstance�_app�env�_env�super�__init__)�selfr$r%r!��	__class__��+/usr/lib/python3/dist-packages/sphinx/io.pyr/3s

zSphinxBaseReader.__init__�appr!cCs||_|j|_dS�N)r+r,r-�r0r5r3r3r4�setup<szSphinxBaseReader.setupcs6t���|j}tg}|D]}||vr|�|�q
|Sr6)r.�get_transformsr#r�remove)r0r#�unused�	transformr1r3r4r9@s
�zSphinxBaseReader.get_transformscsBt���}tj|_t|�|_|j�|jj	�|j
}t�|�|_
|S)zm
        Creates a new document object which has a special reporter object good
        for logging.
        )
r.�new_documentr�documentr2r�transformer�set_environment�settingsr,�reporterr�
from_reporter)r0r>rBr1r3r4r=Ks

zSphinxBaseReader.new_document�r5r!r&N)�__name__�
__module__�__qualname__�__doc__r#rrr�__annotations__rr/r8r9rr>r=�
__classcell__r3r3r1r4r"*s

	r"csPeZdZdZd�fdd�Zded	ed
edej	fdd�Z
d
edefdd�Z
�ZS)�SphinxStandaloneReaderz-
    A basic document reader for Sphinx.
    r5r!r&Ncs"|j|j��|_t��|�dSr6)r#�registryr9r.r8r7r1r3r4r8cszSphinxStandaloneReader.setup�source�parserrAcCs4||_|js	||_||_|�|j�|_|��|jSr6)rMrNrA�read_sourcer,�input�parser>)r0rMrNrAr3r3r4�readgszSphinxStandaloneReader.readr,cCs*|j��}|g}|j�d|j|�|dS)z-Read content from source and do post-process.zsource-readr)rMrR�events�emit�docname)r0r,�content�argr3r3r4rOps
z"SphinxStandaloneReader.read_sourcerD)rErFrGrHr8r
rrrr>rRr�strrOrJr3r3r1r4rK^s
	rKcs"eZdZdZd�fdd�Z�ZS)	�SphinxI18nReadera
    A document reader for i18n.

    This returns the source line number of original text as current source line number
    to let users know where the error happened.
    Because the translated texts are partial and they don't have correct line numbers.
    r5r!r&NcsVt��|�|j|j��|_ttttt	t
ttg}|D]
}||jvr(|j�
|�qdSr6)r.r8r#rLr9rrrrrrrrr:)r0r5r;r<r1r3r4r8�s�
��zSphinxI18nReader.setuprD)rErFrGrHr8rJr3r3r1r4rYzsrYc@seZdZdZdZddd�ZdS)�SphinxDummyWriterz0Dummy writer module used for generating doctree.)�htmlr&NcCsdSr6r3)r0r3r3r4�	translate�szSphinxDummyWriter.translate)r&N)rErFrGrH�	supportedr\r3r3r3r4rZ�srZrMr$r%r&cOs|S)z.Bypass source object as is to cheat Publisher.r3)rMr$r%r3r3r4�SphinxDummySourceClass�sr^cs.eZdZdZdededdf�fdd�Z�ZS)�SphinxFileInputzA basic FileInput for Sphinx.r$r%r&Ncsd|d<t�j|i|��dS)N�sphinx�
error_handler)r.r/)r0r$r%r1r3r4r/�szSphinxFileInput.__init__)rErFrGrHrr/rJr3r3r1r4r_�s"r_r5r!r,�filenamecCs�t|j�}t�d|�t�}|�|�t|jj|�}|j	�
||�}|jjdkr0|j
dkr0tj
|_
t||t�tt�d�}|�d|jd�|j|d�|��|jS)z(Parse a document and convert to doctree.r`�CommonMarkParserr3)�readerrN�writer�source_class�destinationN)�source_path)rrU�codecs�register_errorrKr8r�config�
source_suffixrL�create_source_parserr2rE�
settings_spec�	RSTParserrrZr_r�process_programmatic_settingsrA�
set_source�publishr>)r5r,rbrard�filetyperN�pubr3r3r4�read_doc�s$

�ru)CrHri�typingrrrr�docutilsr�
docutils.corer�docutils.frontendr�docutils.ior	r
r�docutils.parsersr�docutils.parsers.rstro�docutils.readersr
�docutils.transformsr�docutils.transforms.referencesr�docutils.writersrr`r�sphinx.environmentr�sphinx.transformsrrrr�sphinx.transforms.i18nrrr�sphinx.transforms.referencesr�sphinx.utilrrr�sphinx.util.docutilsr�sphinx.versioningrr(r!�	getLoggerrE�logger�Readerr"rKrYrZr^r_rXr>rur3r3r3r4�<module>s>	
4	 

https://t.me/RX1948 - 2025