HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-310.pyc
o

@%Ne�@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-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�nodes)�ViewList)�	Directive)�nested_parse_with_titlesz
.. module:: %s

%s
%s
zX
.. class:: %s

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

    %s

zA
.. class:: %s

    :Short names: %s
    :Filenames: %s

    %s

z'
.. class:: %s

    :Name: %s

    %s

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



zPygmentsDoc.runc
Cs�ddlm}g}i}i}t|��dd�d�D]r\}}|d}t|dd|g�}|j�|j�t||�}	|	j	s;t
d|�|	j	}
t|
t�rH|
�
d�}
|�|g��|d�|d	�pWd
d�|d��dd
��dd�pgd
d�|d�pod
|
f�||vr�|j	}t|t�r�|�
d�}|||<qt|��dd�d�D]8\}}||dur�td|f��||��d���d�}
|�t||
dt|
�f�|D]	}|�t|�q�q�d�|�S)Nr)�LEXERScS�|dS�Nrr"��xr"r"r#�<lambda>[�z-PygmentsDoc.document_lexers.<locals>.<lambda>��keyz&Warning: %s does not have a docstring.�utf8�, ��None��*�\*�_�\�cSr&r'r"r(r"r"r#r*qr+zMissing docstring for %s�.�-r)�$pip._vendor.pygments.lexers._mappingr%�sorted�items�
__import__rr�__file__�getattr�__doc__�print�
isinstance�bytes�decode�
setdefault�append�join�replacer�
splitlines�strip�rstrip�	MODULEDOC�len�LEXERDOC)rr%r�modules�moduledocstrings�	classname�data�module�mod�cls�	docstring�moddocr�headingr"r"r#rVsH


 �

��
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)�
FORMATTERScSr&r'r"r(r"r"r#r*r+z1PygmentsDoc.document_formatters.<locals>.<lambda>r,r.r/r0r1r2r3r4r)�pip._vendor.pygments.formattersrYr;r<r=rrr>r?r@rBrCrD�__name__rF�FMTERDOCrGrH)
rrYrrQrRrSrTrUrVrXr"r"r#r{s 



�
zPygmentsDoc.document_formatterscCsrddlm}g}|��D]'\}}|j�tj|jj�|j	}t
|t�r(|�d�}|�
t|j||f�qd�|�S)Nr)�FILTERSr.r)�pip._vendor.pygments.filtersr]r<rr�sysrO�
__module__r>r@rBrCrDrF�	FILTERDOCr[rG)rr]r�namerUrVr"r"r#r�s


zPygmentsDoc.document_filtersN)
r[r`�__qualname__r@�has_content�required_arguments�optional_arguments�final_argument_whitespace�option_specr$rrrr"r"r"r#r:s%rcCs|�dt�dS)N�pygmentsdoc)�
add_directiver)�appr"r"r#�setup�srl)r@r_�docutilsr�docutils.statemachiner�docutils.parsers.rstr�sphinx.util.nodesrrLrNr\rarrlr"r"r"r#�<module>s

`