AlkantarClanX12

Your IP : 18.224.65.198


Current Path : /lib64/python3.6/site-packages/gi/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/gi/__pycache__/docstring.cpython-36.pyc

3

��<_ �,@s�ddlmZmZmZmZmZmZmZdadd�Z	dd�Z
dd�Zeje
ejeejeejeejeejeejeejeejeejeejeejeejeejeejeej e!ej"e!ej#e!ej$dej%dej&dej'diZ(d	d
�Z)dd�Z*d
d�Z+dd�Z,e	e,�dS)�)�	VFuncInfo�FunctionInfo�CallableInfo�
ObjectInfo�
StructInfo�	Direction�TypeTagNcCs|adS)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/lib64/python3.6/docstring.py�set_doc_string_generator%sr
cCstS)z6Returns the currently registered doc string generator.)r	rrrr�get_doc_string_generator/srcCst|�S)aEGenerate 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	)�inforrr�generate_doc_string4srcCsf|j�}tj|d�}|r(t|d�r(|jS|tjkr^|j�}|j�}|sN|j	�Sd|j
�|fS|j	�S)N�__name__z%s.%s)Zget_tag�_type_tag_to_py_type�get�hasattrrr�	INTERFACEZ
get_interface�get_nameZget_tag_as_stringZ
get_namespace)Zgi_typeZtype_tagZpy_typeZifaceZ	info_namerrr�_get_pytype_hint\s
rc
Csg}t|t�rdg}nt|t�r.|j�r.dg}|j�}d
}t�}t�}x:|D]2}|j|j��|j|j�j	��|j|j
��qLWx�t|�D]�\}}|j�t
jkr�q�||kr�q�|j�}t|j��}	|	|kr�|d|	7}|j�s�||kr�|d7}n|j��r|d7}|j|�q�Wdj|�}
g}t|j��}|j��rf|�rf||k�rf|}|j��r\|d7}|j|�xlt|�D]`\}}|j�t
jk�r��qp||k�r��qp|j�}t|j��}	|	|k�r�|d|	7}|j|��qpW|�r�d|j|
dj|�fSd	|j|
fSdS)N�self�void�:z=Nonez=<optional>z, z or Nonez%s(%s) -> %sz%s(%s))r)�
isinstancerrZ	is_methodZ
get_arguments�set�addZget_destroyZget_typeZget_array_lengthZget_closure�	enumerateZ
get_directionrZOUTrrZmay_be_nullZis_optional�append�joinZget_return_typeZskip_returnZmay_return_null�INr)
rZin_args_strs�argsZhint_blacklistZignore_indicesZuser_data_indices�arg�iZargstrZhintZin_args_strZ
out_args_strsZreturn_hintrrr�_generate_callable_info_docnsb









r%cCs�d}d}t|t�r4|j�dkrH|d|j�d7}n|d|j�d7}x,|j�D] }|j�rR|dt|�d7}qRW|r�||SdSdS)Nz
:Constructors:

::

��z    z()
z(**properties)
�
)rrZget_sizerZget_methodsZis_constructorr%)r�header�docZmethod_inforrr�_generate_class_info_doc�s
r+cCs,t|ttf�rt|�St|t�r(t|�SdS)Nr&)rrrr+rr%)rrrr�_generate_doc_dispatch�s

r,)-Z_girrrrrrrr	r
rrZBOOLEAN�boolZINT8�intZUINT8ZINT16ZUINT16ZINT32ZUINT32ZINT64ZUINT64ZFLOAT�floatZDOUBLEZGLIST�listZGSLISTZARRAYZGHASH�dictZUTF8�strZFILENAMEZUNICHARrZGTYPEZERRORZVOIDrrr%r+r,rrrr�<module>s>$

@