| 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/__pycache__/ |
Upload File : |
a
�ab= � @ s* d Z ddlZddlmZmZ ddlmZ ddlmZ ddl m
Z
mZmZm
Z
ddlmZ ddlmZ dd lmZ e
r�dd
lmZ zddlZdZW n ey� dZY n0 d
Zeee
e d�dd�Zeeee
e d�dd�Zeeed�dd�Zeeed�dd�Z G dd� de�Z!deeef d�dd�Z"dS ) z�
sphinx.versioning
~~~~~~~~~~~~~~~~~
Implements the low-level algorithms Sphinx uses for the versioning of
doctrees.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�product�zip_longest)�
itemgetter)�path)�
TYPE_CHECKING�Any�Dict�Iterator)�uuid4)�Node)�SphinxTransform)�SphinxTF�A )�doctree� condition�returnc c s$ | � |�D ]}t� j|_|V q
dS )a Add a unique id to every node in the `doctree` which matches the
condition and yield the nodes.
:param doctree:
A :class:`docutils.nodes.document` instance.
:param condition:
A callable which returns either ``True`` or ``False`` for a given node.
N)�findallr
�hex�uid)r r Znode� r �5/usr/lib/python3.9/site-packages/sphinx/versioning.py�add_uids# s
r )�old�newr r c c s� | � |�}|� |�}g }g }i }t� }t||�D ]�\} }
| du rL|�|
� q0t| dd�sbt� j| _|
du rv|�| � q0t| j |
j �}|dkr�| j|
_|�
|
� q0||| |
f<