403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/traitlets/config/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/traitlets/config/__pycache__/sphinxdoc.cpython-311.pyc
�

�UcB��`�dZddlmZddlmZddlmZddlmZd�Z	d�Z
d�Zd	�Zd
�Z
d
d�ZdS)a�Machinery for documenting traitlets config options with Sphinx.

This includes:

- A Sphinx extension defining directives and roles for config options.
- A function to generate an rst file given an Application instance.

To make this documentation, first set this module as an extension in Sphinx's
conf.py::

    extensions = [
        # ...
        'traitlets.config.sphinxdoc',
    ]

Autogenerate the config documentation by running code like this before
Sphinx builds::

    from traitlets.config.sphinxdoc import write_doc
    from myapp import MyApplication

    writedoc('config/options.rst',    # File to write
             'MyApp config options',  # Title
             MyApplication()
            )

The generated rST syntax looks like this::

    .. configtrait:: Application.log_datefmt

        Description goes here.

    Cross reference like this: :configtrait:`Application.log_datefmt`.
�)�defaultdict)�dedent)�	Undefined)�indentc�@�|�ddd���ddd�}|S)z�Registers the Sphinx extension.

    You shouldn't need to call this directly; configure Sphinx to use this
    module instead.
    �configtraitz
Config option)�objnameT)�parallel_read_safe�parallel_write_safe)�add_object_type)�app�metadatas  �</usr/lib/python3/dist-packages/traitlets/config/sphinxdoc.py�setupr*s1�����
�}�o��N�N�N�&*�4�H�H�H��O�c��|�	|turdSt|tttt
tf��rt|��SdS)NFT)r�
isinstance�str�list�tuple�dict�set�bool)�dvs r�interesting_default_valuer5sA��
�
��i����u��"�s�D�%��s�3�4�4���B�x�x���4rc��g}|D]4}t|��dkrdnd}|�d|�|�d����5d�|��S)N��-z--z``�, )�len�append�join)�aliases�fmted�a�dashess    r�format_aliasesr'=se���E�
�)�)���A���!�������
���'�&�'�!�'�'�'�(�(�(�(��9�9�U���rc
�Z�g}|j}t|�d��������D�]�\}}|jj}|dz|jz}|d|zdgz
}|j���pd}|�tt|����dz��d|vrH|�td	d
�d�|jD����z����n%|�td|z����t|j��r�	|���}	n#t $rd
}	YnwxYw|	�[t#|	��dkr
|	d
d�dz}	|	�dd��}	|�td|	z����||r:t'||��}
|�td|
z����|�d�����d�|��S)zoGenerate rST documentation for this class' config options.

    Excludes traits defined on parent classes.
    T)�config�.z.. configtrait:: �zNo description�
�Enumz
:options: rc3� K�|]	}d|zV��
dS)z``%r``N�)�.0�xs  r�	<genexpr>z'class_config_rst_doc.<locals>.<genexpr>Xs&����8\�8\�!��A��8\�8\�8\�8\�8\�8\rz
:trait type: N�@�=z...z\nz\\nz:default: ``%s``z
:CLI option: )�__name__�sorted�class_traits�items�	__class__�name�help�rstripr!rrr"�valuesr�
default_value�default_value_repr�	Exceptionr �replacer')�cls�
trait_aliases�lines�	classname�_�trait�ttype�fullnamer;�dvr�fmt_aliasess           r�class_config_rst_docrLEs2��

�E���I��3�+�+�4�+�8�8�>�>�@�@�A�A�$�$���5���(���s�?�U�Z�/��
�%��0�"�5�5���z� � �"�"�6�&6��
���V�F�4�L�L�)�)�D�0�1�1�1��U�?�?��L�L���t�y�y�8\�8\�u�|�8\�8\�8\�/\�/\� \�]�]�^�^�^�^��L�L���%� 7�8�8�9�9�9�%�U�%8�9�9�
	?�
��.�.�0�0�����
�
�
�����
�������s�8�8�b�=�=��c�r�c�(�U�*�C��k�k�%��1�1�����V�$6��$<�=�=�>�>�>���"�	@�(��x�)@�A�A�K��L�L���+� =�>�>�?�?�?�	���R������9�9�U���s�;E�E�Ec���tt��}|j���D] \}}||�|���!|j���D]�\}\}}t
|��dkrpt|��d}||}t
|��dkr@t|��d}	||	dur!||dz|	z�|����|S)zBProduce a mapping of trait names to lists of command line aliases.rrTr*)rrr#r8r!�flagsr )
r
�res�aliasrG�flag�cfgrFrE�cls_cfg�	traitnames
          r�reverse_aliasesrUus���
�d�
�
�C���)�)�+�+�!�!���u��E�
���%� � � � ��)�/�/�+�+�B�B���h�s�A��s�8�8�q�=�=��S�	�	�!��I��)�n�G��7�|�|�q� � � ��M�M�!�,�	��9�%��-�-��	�C��)�3�4�;�;�D�A�A�A���JrNc���t|��}t|d��5}|�|dz��|�dt|��zdz��|�d��|�|�|dz��|���D]:}|�t||����|�d���;	ddd��dS#1swxYwYdS)a�Write a rst file documenting config options for a traitlets application.

    Parameters
    ----------
    path : str
        The file to be written
    title : str
        The human-readable title of the document
    app : traitlets.config.Application
        An instance of the application class to be documented
    preamble : str
        Extra text to add just after the title (optional)
    �wr,�=Nz

)rU�open�writer �_classes_inc_parentsrL)�path�titler
�preamblerC�f�cs       r�	write_docra�s2��$�C�(�(�M�	
�d�C���	�A�	���������	����s�5�z�z�!�T�)�*�*�*�	����
�
�
���
�G�G�H�v�%�&�&�&��)�)�+�+�	�	�A�
�G�G�(��M�:�:�;�;�;�
�G�G�D�M�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�B?C-�-C1�4C1)N)�__doc__�collectionsr�textwrapr�	traitletsr�traitlets.utils.textrrrr'rLrUrar/rr�<module>rgs���!�!�D$�#�#�#�#�#�������������'�'�'�'�'�'����������-�-�-�`���(�����r

Youez - 2016 - github.com/yon3zu
LinuXploit