Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
sphinx
/
builders
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: changes.cpython-310.pyc
o �$�a� � @ s� d Z ddlZddlmZ ddlmZmZmZmZm Z ddl mZ ddlm Z ddlmZ ddlmZ dd lmZmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZmZ e� e!�Z"G dd� de�Z#de dee$ef fdd�Z%dS )z� sphinx.builders.changes ~~~~~~~~~~~~~~~~~~~~~~~ Changelog builder. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. � N)�path)�Any�Dict�List�Tuple�cast)�package_dir)�Sphinx)�Builder)�ChangeSetDomain)�_�__)�HTMLThemeFactory)�logging)�bold)�copy_asset_file)� ensuredir�os_pathc @ sr e Zd ZdZdZed�Zddd�Zdefdd �Z d ddd �Z deddfdd�Zdededefdd�Z ddd�ZdS )�ChangesBuilderzC Write a summary with all versionadded/changed directives. �changesz#The overview file is in %(outdir)s.�returnNc C s2 | � � t| j�}|�d�| _| j�| | j� d S )N�default)�create_template_bridger �app�create�theme� templates�init)�self� theme_factory� r �9/usr/lib/python3/dist-packages/sphinx/builders/changes.pyr $ s zChangesBuilder.initc C s | j S �N)�outdir�r r r r! �get_outdated_docs* s z ChangesBuilder.get_outdated_docs�added�changed� deprecated)�versionadded�versionchangedr( �ignoredc s2 | j j}tt| j�d��}i }g }i }|�|�}|s't�t t d�| �� d S t�t t d��� |D ]�}t|jt �r@|jd } n|j} | j|j } |j�dd�}| rs|j�d�rs|rbd| | |f }nd | | f }|�||j|jf� q2| sx|jr�|jp~td �} | s�td�} |r�d| | |f }nd | | f }|�| g ��||j|jf� q2|s�q2d| �� |f }| jj|j �� }|�|j|fg ��||j|jf� q2| j j|| j j| j jt|� � �t|�t|� � �| j j!| j j"d � }t#t$�%| j&d�ddd��}|�'| j(�)d|�� W d � n 1 �sw Y t#t$�%| j&d�ddd��}|�'| j(�)d|�� W d � n 1 �s3w Y d| d| d| g�dt*dt+dt+f�fdd�� t�t t d��� | jj,D ]�}t#| j�-|�| jj j.d��(}z|�/� }W n t0�y� t�1t d�|� Y W d � �q]w W d � n 1 �s�w Y t$�%| j&dt2|��d }t3t$�4|�� t#|dd!d��*}d"�%� fd#d$�t5|�D ��}| j�-|d �|d%�}|�'| j(�)d&|�� W d � n 1 �s�w Y �q]d'd(� | j6�7i �� � D �}t8t$�%t9d)d*d+d,�| j&|| j(d-� t8t$�%t9d)d.d+d/�| j&� d S )0N� changesetzno changes in version %s.zwriting summary file...r � � zc-apiz<b>%s</b>: <i>%s:</i> %sz<b>%s</b>: <i>%s</i>.�BuiltinszModule levelz <i>%s:</i> %s) �project�version� docstitle� shorttitle� libchanges� apichanges�otherchanges�show_copyright�show_sphinxz index.html�w�utf8)�encodingzchanges/frameset.htmlzchanges.htmlzchanges/versionchanges.htmlz.. versionadded:: %sz.. versionchanged:: %sz.. deprecated:: %s�no�liner c s6 d| t �|� }� D ] }||v rd| } |S q|S )Nz<a name="L%s"> </a>z<span class="hl">%s</span>)�html�escape)r<