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/ext/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/ext/__pycache__/todo.cpython-39.opt-1.pyc
a

�ab �@s�dZddlmZmZmZmZmZddlmZddl	m
Z
mZddlm
Z
ddlmZddlZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZmZddlmZmZddl m!Z!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(e�)e*�Z+Gdd�dej,ej
�Z-Gdd�dej.ej
�Z/Gdd�dee!�Z0Gdd�de�Z1Gdd�de!�Z2Gdd�d�Z3e&e-dd�d d!�Z4e&e-dd�d"d#�Z5e(e-dd�d$d%�Z6e(e-dd�d&d'�Z7eee8efd(�d)d*�Z9dS)+a�
    sphinx.ext.todo
    ~~~~~~~~~~~~~~~

    Allow todos to be inserted into your documentation.  Inclusion of todos can
    be switched of by a configuration variable.  The todolist directive collects
    all todos of your project and lists them along with a backlink to the
    original location.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�Any�Dict�List�Tuple�cast)�nodes)�Element�Node)�
directives)�BaseAdmonitionN)�addnodes)�Sphinx)�Domain)�BuildEnvironment)�NoUri)�_�__)�logging�	texescape)�SphinxDirective�new_document)�
OptionSpec)�HTMLTranslator)�LaTeXTranslatorc@seZdZdS)�	todo_nodeN��__name__�
__module__�__qualname__�rr�3/usr/lib/python3.9/site-packages/sphinx/ext/todo.pyr%src@seZdZdS)�todolistNrrrrr r!)sr!csVeZdZUdZeZdZdZdZdZ	e
je
jd�Z
eed<eed��fdd	�Z�ZS)
�TodozO
    A todo entry, displayed (if configured) in the form of an admonition.
    TrF)�class�name�option_spec��returncs�|j�d�sdg|jd<t���\}t|tj�r6|gSt|t�r�|�dtj	t
d�d��|jj|d<|�
|�|�|�|jj�|�|gSt�dS)Nr#zadmonition-todorr")�text�docname)�options�get�super�run�
isinstancerZsystem_messager�insert�titler�envr)Zadd_nameZset_source_info�state�documentZnote_explicit_target�RuntimeError)�self�todo��	__class__rr r-<s


zTodo.run)rrr�__doc__rZ
node_class�has_content�required_arguments�optional_arguments�final_argument_whitespacer
Zclass_optionZ	unchangedr%r�__annotations__rr	r-�
__classcell__rrr7r r"-s
�r"c@sneZdZdZdZeeeee	fd�dd��Z
edd�dd�Zeeedd	�d
d�Ze
eejdd�d
d�ZdS)�
TodoDomainr6r&cCs|j�di�S�N�todos)�data�
setdefault�r5rrr rBRszTodoDomain.todosN)r)r'cCs|j�|d�dS�N)rB�pop)r5r)rrr �	clear_docVszTodoDomain.clear_doc)�docnames�	otherdatar'cCs |D]}|d||j|<qdSrA)rB)r5rIrJr)rrr �merge_domaindataYszTodoDomain.merge_domaindata)r1r)r3r'cCs^|j�|g�}|�t�D]@}|j�d|�|�|�|jjrt	j
td�|d��|d�qdS)N�todo-definedzTODO entry found: %s�)�location)
rBrD�findallr�app�emit�append�config�todo_emit_warnings�loggerZwarningr�astext)r5r1r)r3rBr6rrr �process_doc]s
�zTodoDomain.process_doc)rrrr$Zlabel�propertyr�strrrrBrHrKrrr3rWrrrr r@Ns�r@c@s@eZdZUdZdZdZdZdZiZe	e
d<eed�dd�Z
dS)	�TodoListz%
    A list of all todo entries.
    Frr%r&cCs
td�gS)N�)r!rErrr r-tszTodoList.runN)rrrr9r:r;r<r=r%rr>rr	r-rrrr rZis
rZc@s\eZdZeejedd�dd�Zejedd�dd�Ze	eej
d�d	d
�Ze	edd�dd�ZdS)
�TodoListProcessorN)rP�doctreer)r'cCsF|j|_|j|_|j|_tt|j�d��|_td�|_|�	||�dS)Nr6r[)
�builderrSr1rr@Z
get_domain�domainrr3�process)r5rPr]r)rrr �__init__{s
zTodoListProcessor.__init__)r]r)r'c	Cs�t|jj��g�}t|�t��D]�}|jjs:|j	�
|�q |�d�rPt�
�g}ng}|D]D}|��}|d��|�||�|�|�|�||�}|�|�qX|�|�q dS)N�ids)�sumr_rB�values�listrOr!rS�todo_include_todos�parent�remover+r�targetZdeepcopy�clear�resolve_referencerR�create_todo_referenceZreplace_self)	r5r]r)rB�nodeZcontentr6Znew_todoZtodo_refrrr r`�s 

zTodoListProcessor.process)r6r)r'c	Cs�|jjrtd�}ntd�|j|jf}|d|�d��}||�d�dd�}tjdgd�}|t�||�7}t�	td�td��}tj
d	d	|d
d�}z6|j�||d�|d
<|d
d|dd7<Wnt
y�Yn0||7}|t�||�7}|S)Nz<<original entry>>z3(The <<original entry>> is located in %s, line %d.)z<<z>>�ztodo-source)�classeszoriginal entryr[T)Zinternalr)Zrefuri�#rbr)rS�todo_link_onlyr�source�line�findr�	paragraph�TextZemphasis�	referencer^Zget_relative_urir)	r5r6r)�description�prefix�suffixZparaZlinktextrwrrr rl�s&

� z'TodoListProcessor.create_todo_referencecCsT|�tj�D]}d|vr||d<q|j|7_|j�|j||j�|j�|�dS)z'Resolve references in the todo content.ZrefdocN)rOrZpending_xrefr3r1Zresolve_referencesr^rh)r5r6r)rmrrr rk�s
z#TodoListProcessor.resolve_reference)
rrrr
rr3rYrar`rrurlrkrrrr r\zs	r\)r5rmr'cCs|jjr|�|�ntj�dSrF)rSrfZvisit_admonitionr�SkipNode�r5rmrrr �visit_todo_node�sr}cCs|�|�dSrF)Zdepart_admonitionr|rrr �depart_todo_node�sr~cCsp|jjrf|j�d�|j�|�|��ttj|d�}t�	|�
�|jj�}|j�d|�|�d�ntj
�dS)Nz 
\begin{sphinxadmonition}{note}{rz%s:})rSrf�bodyrRZhypertarget_torrr0r�escaperVZlatex_enginerGr{)r5rmZ
title_noder0rrr �latex_visit_todo_node�sr�cCs|j�d�dS)Nz\end{sphinxadmonition}
)rrRr|rrr �latex_depart_todo_node�sr�)rPr'cCs�|�d�|�ddd�|�ddd�|�ddd�|�t�|jtttfttfttfttfttfd�|�	dt
�|�	d	t�|�t
�|�d
t�tjddd
�S)NrLrfF�htmlrqrT)r�Zlatexr(ZmanZtexinfor6r!zdoctree-resolvedrnT)�versionZenv_versionZparallel_read_safe)Z	add_eventZadd_config_valueZadd_noder!rr}r~r�r�Z
add_directiver"rZZ
add_domainr@Zconnectr\�sphinxZ__display_version__)rPrrr �setup�s(

�
�r�):r9�typingrrrrrZdocutilsrZdocutils.nodesrr	Zdocutils.parsers.rstr
Z+docutils.parsers.rst.directives.admonitionsrr�rZsphinx.applicationr
Zsphinx.domainsrZsphinx.environmentrZ
sphinx.errorsrZ
sphinx.localerrZsphinx.utilrrZsphinx.util.docutilsrrZsphinx.util.typingrZsphinx.writers.htmlrZsphinx.writers.latexrZ	getLoggerrrUZ
AdmonitionrZGeneralr!r"r@rZr\r}r~r�r�rYr�rrrr �<module>s:

!K


Youez - 2016 - github.com/yon3zu
LinuXploit