a
    ÷£Be¨  ã                   @   s�   U d dl Z d dlmZ d dlmZmZ d dlmZ z*d dlm	Z	 e	j	Z
eeeef  ed< W n eyr   dZ
Y n0 G dd„ deƒZd	d
„ ZdS )é    N)Úsuppress)ÚDictÚOptional)ÚAbstractArbitraryName)ÚtopicsÚpydoc_topicsc                   @   s   e Zd ZdZdd„ ZdS )ÚKeywordNameÚkeywordc                 C   s
   t | jƒS ©N)Úimitate_pydocZstring_name)Úself© r   úT/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/jedi/api/keywords.pyÚ	py__doc__   s    zKeywordName.py__doc__N)Ú__name__Ú
__module__Ú__qualname__Zapi_typer   r   r   r   r   r      s   r   c                    sÆ   t du rdS tj‰ ttƒ�* ˆ j|  } |  d¡\} }}W d  ƒ n1 sJ0    Y  ‡ fdd„}t| tƒrt|| ƒ} q`z| \}}W n t	y”   Y dS 0 zt r¨t |  
¡ ndW S  tyÀ   Y dS 0 dS )z]
    It's not possible to get the pydoc's without starting the annoying pager
    stuff.
    NÚ ú c                    s   ˆ j  | ˆ j | ¡¡S r
   )r   ÚgetÚkeywords)Ús©Úhr   r   Ú
get_target$   s    z!imitate_pydoc.<locals>.get_target)r   ÚpydocÚhelpr   ÚKeyErrorÚsymbolsÚ	partitionÚ
isinstanceÚstrÚ	TypeErrorÚstrip)ÚstringÚ_Úrelatedr   Úlabelr   r   r   r      s"    

.

r   )r   Ú
contextlibr   Útypingr   r   Zjedi.inference.namesr   Z
pydoc_datar   r   r!   Ú__annotations__ÚImportErrorr   r   r   r   r   r   Ú<module>   s   

