
    7 f
                    d    d Z ddlmZ ddlmZ erddlmZ ddlmZ ddl	m
Z
  G d d          Zd	S )
z5The data collector components for sphinx.environment.    )annotations)TYPE_CHECKING)nodes)Sphinx)BuildEnvironmentc                  Z    e Zd ZU dZdZded<   dd	Zdd
ZddZddZ	d dZ
d!dZd"dZdS )#EnvironmentCollectoraC  An EnvironmentCollector is a specific data collector from each document.

    It gathers data and stores :py:class:`BuildEnvironment
    <sphinx.environment.BuildEnvironment>` as a database.  Examples of specific
    data would be images, download files, section titles, metadatas, index
    entries and toctrees, etc.
    Nzdict[str, int] | Nonelistener_idsappr   returnNonec                ,   | j         J |                    d| j                  |                    d| j                  |                    d| j                  |                    d| j                  |                    d| j                  d| _         d S )Ndoctree-readenv-merge-infoenv-purge-docenv-get-updatedenv-get-outdated)r   r   r   r   r   )r
   connectprocess_docmerge_other	clear_docget_updated_docsget_outdated_docs)selfr   s     \/var/www/equiseq/venv/lib/python3.11/site-packages/sphinx/environment/collectors/__init__.pyenablezEnvironmentCollector.enable   s     ((( #ND<L M M #,<d>N O O #OT^ L L #,=t?T U U #,>@V W W
 
    c                    | j         J | j                                         D ]}|                    |           d | _         d S )N)r
   values
disconnect)r   r   listener_ids      r   disablezEnvironmentCollector.disable#   sR     ,,,,3355 	( 	(KNN;'''' r   envr   docnamestrc                    t           )zcRemove specified data of a document.

        This method is called on the removal of the document.NotImplementedError)r   r   r#   r$   s       r   r   zEnvironmentCollector.clear_doc)   
     "!r   docnamesset[str]otherc                    t           )zMerge in specified data regarding docnames from a different `BuildEnvironment`
        object which coming from a subprocess in parallel builds.r'   )r   r   r#   r*   r,   s        r   r   z EnvironmentCollector.merge_other/   r)   r   doctreenodes.documentc                    t           )zoProcess a document and gather specific data from it.

        This method is called after the document is read.r'   )r   r   r.   s      r   r   z EnvironmentCollector.process_doc5   r)   r   	list[str]c                    g S )zReturn a list of docnames to re-read.

        This methods is called after reading the whole of documents (experimental).
         )r   r   r#   s      r   r   z%EnvironmentCollector.get_updated_docs;   s	    
 	r   addedchangedremovedc                    g S )zlReturn a list of docnames to re-read.

        This methods is called before reading the documents.
        r3   )r   r   r#   r4   r5   r6   s         r   r   z&EnvironmentCollector.get_outdated_docsB   s	     	r   )r   r   r   r   )r   r   r#   r   r$   r%   r   r   )
r   r   r#   r   r*   r+   r,   r   r   r   )r   r   r.   r/   r   r   )r   r   r#   r   r   r1   )r   r   r#   r   r4   r+   r5   r+   r6   r+   r   r1   )__name__
__module____qualname____doc__r
   __annotations__r   r"   r   r   r   r   r   r3   r   r   r	   r	      s           +/L....
 
 
 
! ! ! !" " " "" " " "" " " "        r   r	   N)r;   
__future__r   typingr   docutilsr   sphinx.applicationr   sphinx.environmentr   r	   r3   r   r   <module>rB      s    ; ; " " " " " "             4))))))333333: : : : : : : : : :r   