File: //lib/python3/dist-packages/gi/__pycache__/docstring.cpython-310.pyc
o
��b] � @ s d dl mZmZmZmZmZmZmZ dadd� Z dd� Z
dd� Zi eje
�eje�eje�eje�eje�eje�eje�eje�eje�eje�eje�eje�eje�eje�eje�ej e!�ej"e!�ej#e!ej$dej%dej&dej'di�Z(d d
� Z)dd� Z*d
d� Z+dd� Z,e e,� dS )� )� VFuncInfo�FunctionInfo�CallableInfo�
ObjectInfo�
StructInfo� Direction�TypeTagNc C s | a dS )z�Set doc string generator function
:param callable func:
Callable which takes a GIInfoStruct and returns documentation for it.
N��_generate_doc_string_func)�func� r �./usr/lib/python3/dist-packages/gi/docstring.py�set_doc_string_generator% s r c C s t S )z6Returns the currently registered doc string generator.r r r r r
�get_doc_string_generator/ s r c C s t | �S )aE Generate a doc string given a GIInfoStruct.
:param gi.types.BaseInfo info:
GI info instance to generate documentation for.
:returns:
Generated documentation as a string.
:rtype: str
This passes the info struct to the currently registered doc string
generator and returns the result.
r ��infor r r
�generate_doc_string4 s r c C sf | � � }t�|d �}|rt|d�r|jS |tjkr/| �� }|�� }|s'| � � S d|�
� |f S | � � S )N�__name__z%s.%s)�get_tag�_type_tag_to_py_type�get�hasattrr r � INTERFACE�
get_interface�get_name�get_tag_as_string�
get_namespace)�gi_type�type_tag�py_type�iface� info_namer r r
�_get_pytype_hint\ s
r"