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

�$�a��@s�dZddlmZddlmZddlmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZmZddlmZddlmZddlmZerDdd	lmZe�e�ZGd
d�de�Zdd
dddddddddddddd�ZGdd�d�ZdS)z�
    sphinx.events
    ~~~~~~~~~~~~~

    Sphinx core events.

    Gracefully adapted from the TextPress system by Armin.

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�defaultdict)�
attrgetter)�
TYPE_CHECKING�Any�Callable�Dict�List�
NamedTuple�Tuple�Type)�ExtensionError�SphinxError)�__)�logging)�safe_getattr)�Sphinxc@s&eZdZUeed<eed<eed<dS)�
EventListener�id�handler�priorityN)�__name__�
__module__�__qualname__�int�__annotations__r�rr�//usr/lib/python3/dist-packages/sphinx/events.pyrs
r��configzenv, added, changed, removed�envzenv, docnamez
env, docnameszdocname, source textz the doctree before being pickledz&env, read docnames, other env instancezenv, node, contnodezdomain, nodezdoctree, docname�	exception)zbuilder-initedz
config-initedzenv-get-outdatedzenv-get-updatedz
env-purge-doczenv-before-read-docszenv-check-consistencyzsource-readzdoctree-readzenv-merge-infozmissing-referencezwarn-missing-referencezdoctree-resolvedzenv-updatedzbuild-finishedc	@s�eZdZdZddd�Zdeddfd	d
�Zdedededefd
d�Z	deddfdd�Z
dd�dededee
edfdefdd�Zdd�dededee
edfdefdd�ZdS)�EventManagerzEvent manager for Sphinx.�appr�returnNcCs$||_t��|_tt�|_d|_dS)Nr)r"�core_events�copy�eventsr�list�	listeners�next_listener_id)�selfr"rrr�__init__:s


zEventManager.__init__�namecCs(||jvr
ttd�|��d|j|<dS)zRegister a custom Sphinx event.zEvent %r already presentrN)r&rr)r*r,rrr�add@s
zEventManager.add�callbackrcCsJ||jvr
ttd�|��|j}|jd7_|j|�t|||��|S)z$Connect a handler to specific event.zUnknown event name: %s�)r&rrr)r(�appendr)r*r,r.r�listener_idrrr�connectFs
zEventManager.connectr1cCs:|j��D]}|dd�D]}|j|kr|�|�q
qdS)zDisconnect a handler.N)r(�valuesr�remove)r*r1r(�listenerrrr�
disconnectPs

���zEventManager.disconnectr)�allowed_exceptions�argsr7.c	Gs�zt�d|t|�dd��Wn	tyYnwg}t|j|td�d�}|D]A}z|�|j|j	g|�R��Wq(|yA�t
yH�tyi}zt|jdd�}tt
d�|j|f||d�|�d}~ww|S)	zEmit a Sphinx event.z[app] emitting event: %r%sN�dr)�keyrz*Handler %r for event %r threw an exception)�modname)�logger�debug�repr�	Exception�sortedr(rr0rr"r
rrr)	r*r,r7r8�resultsr(r5�excr;rrr�emitWs4������zEventManager.emitcGs2|j|g|�Rd|i�D]
}|dur|SqdS)z�Emit a Sphinx event and returns first result.

        This returns the result of the first handler that doesn't return ``None``.
        r7N)rC)r*r,r7r8�resultrrr�emit_firstresultqs
�zEventManager.emit_firstresult)r"rr#N)rrr�__doc__r+�strr-rrr2r6rr
rr?rrCrErrrrr!7s$

��
����r!N)rF�collectionsr�operatorr�typingrrrrrr	r
r�
sphinx.errorsrr
�
sphinx.localer�sphinx.utilr�sphinx.util.inspectr�sphinx.applicationr�	getLoggerrr<rr$r!rrrr�<module>s:(
�

https://t.me/RX1948 - 2025