
    -e1                        d Z ddlmZ ddlZ ej        e          ZddlZddlZddl	m
Z
 ddlmZ ddlmZmZ ddlmZ dd	lmZmZ dd
lmZ dZ G d de          Zd ZdS )a   Thoroughly document Bokeh settings.

The ``bokeh-model`` directive will automatically document all the attributes
(including Bokeh PrioritizedSettings) of an object.

This directive takes the name of a module attribute

.. code-block:: rest

    .. bokeh-settings:: settings
        :module: bokeh.settings

To enable this extension, add `"bokeh.sphinxext.bokeh_settings"` to the
extensions list in your Sphinx configuration module.

    )annotationsN)	unchanged)SphinxError)PrioritizedSetting_Unset   )PARALLEL_SAFE)BokehDirective	py_sig_re)SETTINGS_DETAIL)BokehSettingsDirectivesetupc                  (    e Zd ZdZdZdZdeiZd ZdS )r   Tr   modulec           	     v   d                     | j                  }t          j        |          }|t	          d|          |                                \  }}}}| j        d         }	 t          j        |          }n## t          $ r t	          d| d|           w xY wt          ||d           }	|	t	          d| d| d|           g }
|	j        j                                        D ]}t          |t                    s|j        |j        |j        t'          j        |j                  |j        t.          u rdnt1          |j                  |j        t.          u rdnt1          |j                  d	}|
                    |           t7          j        |||

          }|                     |d          S )N z+Unable to parse signature for bokeh-model: r   z&Unable to generate reference docs for z: couldn't import module z: no model z in module z(Unset))nameenv_vartypehelpdefaultdev_default)r   module_namesettingsz<bokeh-settings>)join	argumentsr   matchr   groupsoptions	importlibimport_moduleImportErrorgetattr	__class____dict__values
isinstancer   r   r   convert_typetextwrapdedentr   r   r   reprr   appendr   renderparse)selfsigmname_prefixobj_namearglistretannr   r   objr   xsettingrst_texts                 >lib/python3.11/site-packages/bokeh/sphinxext/bokeh_settings.pyrunzBokehSettingsDirective.runN   s   hht~&&OC  9SCSSTTT12.Xwl8,	y,[99FF 	y 	y 	ywxwwjuwwxxx	y fh--;~x~~\d~~q|~~'..00 	% 	%Aa!344  9 //()	V(;(;99ai,-MV,C,CyyamI\I\ G OOG$$$$")x[[cdddzz($6777s   *A? ? BN)	__name__
__module____qualname__has_contentrequired_argumentsoptional_argumentsr   option_specr;        r:   r   r   G   s>        KY'K#8 #8 #8 #8 #8rD   r   c                H    |                      ddt                     t          S )z+ Required Sphinx extension setup function. pyzbokeh-settings)add_directive_to_domainr   r	   )apps    r:   r   r   t   s"    &68NOOOrD   )__doc__
__future__r   logging	getLoggerr<   logr    r)   docutils.parsers.rst.directivesr   sphinx.errorsr   bokeh.settingsr   r    r	   bokeh_directiver
   r   	templatesr   __all__r   r   rC   rD   r:   <module>rU      s   ( # " " " " " g!!      6 5 5 5 5 5 % % % % % % 6 5 5 5 5 5 5 5       6 6 6 6 6 6 6 6 & & & & & &*8 *8 *8 *8 *8^ *8 *8 *8Z    rD   