HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/sphinx/util/__pycache__/docstrings.cpython-310.pyc
o

�$�a��
@s�dZddlZddlZddlZddlmZmZmZddlm	Z	ddl
mZmZe�
e	jd�Zdedeeeeefffd	d
�Zdedeeeffdd�Zddedededeefdd�Zdedeefdd�ZdS)z�
    sphinx.util.docstrings
    ~~~~~~~~~~~~~~~~~~~~~~

    Utilities for docstring processing.

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Dict�List�Tuple)�Body)�RemovedInSphinx50Warning�RemovedInSphinx60Warning�field_marker�s�returncCs�d}i}g}|s||fSt|�D]N}|��dkr d}|�|�qt�|�}|rW|sW|��dd��dd�d}|�d�rQ|dd���}||��d���||<q|�|�qd	}|�|�qd
�	|�|fS)z,Separate docstring into metadata and others.F��N�:rzmeta �T�
)
�prepare_docstring�strip�append�field_list_item_re�match�group�split�
startswith�end�join)r	�in_other_element�metadata�lines�line�matched�
field_name�name�r!�8/usr/lib/python3/dist-packages/sphinx/util/docstrings.py�separate_metadatas&

r#cCs tjdtdd�t|�\}}|S)Nz!extract_metadata() is deprecated.���
stacklevel)�warnings�warnrr#)r	�	docstringrr!r!r"�extract_metadata4s
�r*��ignore�tabsizec	Cs|durd}ntjdtdd�|�|���}tj}||d�D]}t|���}|r4t|�|}t	||�}qt
|�D]}|t|�krI||��||<q9|tjkrct
|t|��D]}|||d�||<qV|rt|dst|�d�|rt|dri|r|dr|�d�|S)	a�Convert a docstring into lines of parseable reST.  Remove common leading
    indentation, where the indentation of a given number of lines (usually just
    one) is ignored.

    Return the docstring as a list of lines usable for inserting into a docutils
    ViewList (used as argument of nested_parse().)  An empty line is added to
    act as a separator between this docstring and following content.
    Nrz;The 'ignore' argument to prepare_docstring() is deprecated.r$r%r���r)
r'r(r�
expandtabs�
splitlines�sys�maxsize�len�lstrip�min�range�popr)	r	r,r-r�marginr�content�indent�ir!r!r"r<s4	�
��

�
rcCszg}dd�|����D�}|D] }|�d�r/|dd�}|r*|ddkr*|dd�}|�|�q|r;|d	r;|�d
�|S)z�Extract documentation comment lines (starting with #:) and return them
    as a list of lines.  Returns an empty list if there is no documentation.
    cSsg|]}|���qSr!)r)�.0rr!r!r"�
<listcomp>hsz&prepare_commentdoc.<locals>.<listcomp>z#:r$Nr� rr.r)r/r0rr)r	�resultrrr!r!r"�prepare_commentdoccs

�
r@)Nr+)�__doc__�rer1r'�typingrrr�docutils.parsers.rst.statesr�sphinx.deprecationrr�compile�patternsr�strr#r*�intrr@r!r!r!r"�<module>s
" '