| 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 : |
�
�UcB � �` � d Z ddlmZ ddlmZ ddlmZ ddlmZ d� Z d� Z
d� Zd � Zd
� 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 � � | � | t u rdS t | t t t t
t f� � rt | � � S dS )NFT)r �
isinstance�str�list�tuple�dict�set�bool)�dvs r �interesting_default_valuer 5 sA � �
�
��i����u��"�s�D�%��s�3�4�4� ��B�x�x���4r c � � g }| D ]4}t |� � dk rdnd}|� d|� |� d�� � �5d� |� � S )N� �-z--z``�, )�len�append�join)�aliases�fmted�a�dashess r �format_aliasesr'