HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-310.pyc
o

��h-�@shdZddlZddlmZddlmZddlmZddlm	Z	dZ
dZd	Zd
Z
Gdd�de�Zd
d�ZdS)a
    pygments.sphinxext
    ~~~~~~~~~~~~~~~~~~

    Sphinx extension to generate automatic documentation of lexers,
    formatters and filters.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�nodes)�ViewList)�	Directive)�nested_parse_with_titlesz
.. module:: %s

%s
%s
z`
.. class:: %s

    :Short names: %s
    :Filenames:   %s
    :MIME types:  %s

    %s

    %s

zA
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

z'
.. class:: %s

    :Name: %s

    %s

c@sLeZdZdZdZdZdZdZiZdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dS)�PygmentsDoczn
    A directive to collect all lexers/formatters/filters and generate
    autoclass directives for them.
    F�rcCs�t�|_|jddkr|��}n(|jddkr|��}n|jddkr(|��}n|jddkr4|��}ntd��t�	�}t
|�d�dd	�}t|j
||�|jD]}|j
jjj�|�qO|jS)
Nr�lexers�
formatters�filters�lexers_overviewz,invalid argument for "pygmentsdoc" directive�
�)�source)�set�	filenames�	arguments�document_lexers�document_formatters�document_filters�document_lexers_overview�	Exceptionr�compoundr�splitr�state�document�settings�record_dependencies�add�children)�self�out�node�vl�fn�r$�I/usr/local/lib/python3.10/dist-packages/pip/_vendor/pygments/sphinxext.py�runGs 




zPygmentsDoc.runc
s\ddlm}ddlm}g}g�dd�}t|��dd�d�D]9\}}||d	�}|j|j}��||d	|j	�d
�
|��dd��d
d�pEdd
�
|d�|d�d|��d��qgd�}	�fdd�|	D���fdd����fdd�}
|�|
��|��dddd��|�|
���D]}|��|d|d|dd |d!�d"���q�|�|
��d#�
|�S)$z�Generate a tabular overview of all lexers.

        The columns are the lexer name, the extensions handled by this lexer
        (or "None"), the aliases and a link to the lexer class.r��LEXERS)�find_lexer_classcSs|rd|�d|�d�S|S)N�`z <z>`_r$)�name�urlr$r$r%�format_linkesz9PygmentsDoc.document_lexers_overview.<locals>.format_linkcSs|dd��S)Nr)�lower��xr$r$r%�<lambda>jsz6PygmentsDoc.document_lexers_overview.<locals>.<lambda>��keyr�, �*�\*�_�\�None��.)r+�
extensions�aliases�classcs"g|]
�t�fdd��D���qS)cs g|]}|�rt|���qSr$)�len)�.0�row��columnr$r%�
<listcomp>vs zCPygmentsDoc.document_lexers_overview.<locals>.<listcomp>.<listcomp>)�max)r@)�tablerBr%rDvs�z8PygmentsDoc.document_lexers_overview.<locals>.<listcomp>csFg}t�|�D]\}}|r|�|�|��q|�d|�qd�|�S)zFormat a table row� )�zip�append�ljust�join)�columnsr �length�col)�column_lengthsr$r%�	write_rowys
z7PygmentsDoc.document_lexers_overview.<locals>.write_rowcsdd��D�}�|�S)zWrite a table separator rowcSsg|]}d|�qS)�=r$)r@�cr$r$r%rD�szQPygmentsDoc.document_lexers_overview.<locals>.write_seperator.<locals>.<listcomp>r$)�sep)rOrPr$r%�write_seperator�sz=PygmentsDoc.document_lexers_overview.<locals>.write_seperator�NamezExtension(s)z
Short name(s)zLexer classr+r<r=z	:class:`~r>r*r)�$pip._vendor.pygments.lexers._mappingr(�pip._vendor.pygments.lexersr)�sorted�itemsr�alias_filenamesrIr,rK�replace)rr(r)r r-�	classname�data�	lexer_clsr<�column_namesrTrAr$)rOrFrPr%rZs@
�
��
z$PygmentsDoc.document_lexers_overviewc
Cs~ddlm}ddlm}ddl}ddl}g}i}i}t|��dd�d�D]�\}}	|	d}
t|
dd|g�}|j	�
|j�t||�}|j
sKtd|�d��|j
}
t|
t�rX|
�d	�}
t|d
d�}|r�|�|�|��jjdd|}|jd
d�}|s�td|�d|����|	dr�|	dd}|
d7}
|
d|�d�7}
|��D]
}|
d|�d�7}
q�|jr�d|j��}nd}|�|
g��|d�|	d�p�dd�|	d��dd��dd�p�dd�|	d �p�d|
|f�|
|vr�|j
}t|t�r�|�d	�}|||
<q$t|��d!d�d�D]:\}
}||
du�rtd"|
����||
��d ���d#�}|�t|
|d$t |�f�|D]
}	|�t!|	��q.q�d�|�S)%Nrr')�pygmentscS�|dS�Nrr$r/r$r$r%r1��z-PygmentsDoc.document_lexers.<locals>.<lambda>r2z	Warning: z does not have a docstring.�utf8�_example�tests�examplefileszutf-8)�encodingzEmpty example file 'z' for lexer r:z

    .. admonition:: Example
z
      .. code-block:: z

z
          rz.. versionadded:: r
r4r9�r5r6r7r8�cSrarbr$r/r$r$r%r1�rczMissing docstring for r;�-)"rVr(�pip._vendorr`�inspect�pathlibrXrY�
__import__rr�__file__�getattr�__doc__�print�
isinstance�bytes�decode�Path�
getabsfile�parent�	read_textr�
splitlines�
version_added�
setdefaultrIrKr[�strip�rstrip�	MODULEDOCr?�LEXERDOC)rr(r`rmrnr �modules�moduledocstringsr\r]�module�mod�cls�	docstring�example_file�p�content�
lexer_name�line�version_line�moddocr�headingr$r$r%r�s�


����� �

��
zPygmentsDoc.document_lexersc

Cs�ddlm}g}t|��dd�d�D]I\}}|d}t|dd|g�}|j�|j�t||�}|j	}t
|t�r;|�d�}|j
}	|�t|	d�|d�pJd	d�|d
��dd�pVd	|f�qd
�|�S)Nr)�
FORMATTERScSrarbr$r/r$r$r%r1�rcz1PygmentsDoc.document_formatters.<locals>.<lambda>r2rdr4r:r9rir5r6r
)�pip._vendor.pygments.formattersr�rXrYrorrrprqrrrtrurv�__name__rI�FMTERDOCrKr[)
rr�r r\r]r�r�r�r�r�r$r$r%r�s 



�
zPygmentsDoc.document_formatterscCsrddlm}g}|��D]'\}}|j�tj|jj�|j	}t
|t�r(|�d�}|�
t|j||f�qd�|�S)Nr)�FILTERSrdr
)�pip._vendor.pygments.filtersr�rYrr�sysr��
__module__rprrrtrurvrI�	FILTERDOCr�rK)rr�r r+r�r�r$r$r%r�s


zPygmentsDoc.document_filtersN)r�r��__qualname__rr�has_content�required_arguments�optional_arguments�final_argument_whitespace�option_specr&rrrrr$r$r$r%r<s<ArcCs|�dt�dS)N�pygmentsdoc)�
add_directiver)�appr$r$r%�setup�sr�)rrr��docutilsr�docutils.statemachiner�docutils.parsers.rstr�sphinx.util.nodesrr�r�r�r�rr�r$r$r$r%�<module>s


;