Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/idlelib/__pycache__/calltip.cpython-36.opt-2.pyc

3

��2a��@s�ddlZddlZddlZddlZddlZddlmZddlmZddl	Z	Gdd�d�Z
dd�ZdZd	Z
dZejd�Zd
ZdZdZdd�Zedkr�ddlmZeddd�dS)�N)�	calltip_w)�HyperParserc@sXeZdZddd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)�CalltipNcCs0|dkrd|_n||_|j|_d|_|j|_dS)N)�editwin�text�active_calltip�_make_tk_calltip_window�_calltip_window)�selfr�r�,/opt/alt/python36/lib64/python3.6/calltip.py�__init__szCalltip.__init__cCs
d|_dS)N)r	)r
rrr�closesz
Calltip.closecCstj|j�S)N)rZ
CalltipWindowr)r
rrrr szCalltip._make_tk_calltip_windowcCs|jr|jj�d|_dS)N)rZhidetip)r
�eventrrr�_remove_calltip_window$s
zCalltip._remove_calltip_windowcCs|jd�dS)NT�break)�open_calltip)r
rrrr�force_open_calltip_event)s
z Calltip.force_open_calltip_eventcCs|jd�dS)NF)r)r
rrrr�try_open_calltip_event.szCalltip.try_open_calltip_eventcCs|jr|jjr|jd�dS)NF)rZ	tipwindowr)r
rrrr�refresh_calltip_event5szCalltip.refresh_calltip_eventcCs�|j�t|jd�}|jd�}|s&dS|j|d�|j�}|sDdS|r\|jd�dkr\dS|j|�}|sndS|j�|_	|j	j
||d|d�dS)N�insert�(r����)rrrZget_surrounding_bracketsZ	set_indexZget_expression�find�	fetch_tipr	rZshowtip)r
Z	evalfuncsZhpZ	sur_paren�
expression�argspecrrrr9s 


zCalltip.open_calltipc
CsRy|jjjjj}Wntk
r*d}YnX|rB|jdd|fi�Stt|��SdS)N�execZget_the_calltip)	r�flistZpyshellZinterp�rpcclt�AttributeErrorZ
remotecall�get_argspec�
get_entity)r
rr rrrrLs

zCalltip.fetch_tip)N)N)�__name__�
__module__�__qualname__r
rrrrrrrrrrrrrs
	
rcCs>|r:tjj�}|jtj�y
t||�Stk
r8dSXdS)N)�sys�modules�copy�update�__main__�__dict__�eval�
BaseException)r�	namespacerrrr#es

r#�U�� �z(?<=\()\w*\,?\s*zSee source or doczinvalid method signaturez4
['/' marks preceding arguments as positional-only]
c
Csrd}}y
|j}Wntk
r&|SXt|tj�r8|n|}yttj|��}Wn8tk
r�}zt|�}|j	t
�rvt
SWYdd}~XnXd|kr�|t7}t|t�r�|dkr�t
}t|�tkr�tj|ttd�n|r�|gng}t|tj�r�|j}nt|dd�}|�rdxZ|jdt�dt�D]B}	|	j�}	|	�s(Pt|	�tk�rJ|	dtd�d}	|j|	��qWdj|�}|�snt
}|S)	N��/z())�subsequent_indent�__doc__�
�z...)�__call__r.�
isinstance�types�
MethodType�str�inspectZ	signature�
ValueError�
startswith�_invalid_method�_argument_positional�type�_default_callable_argspec�len�	_MAX_COLS�textwrap�wrap�_INDENTr7�getattr�split�
_MAX_LINES�strip�append�join)
�obr�defaultZob_callZfob�err�msg�lines�doc�linerrrr"|s@	

*
r"r+)�mainzidlelib.idle_test.test_calltip�)�	verbosityz    )r?�rer'rHr<ZidlelibrZidlelib.hyperparserrr+rr#rGrMrJ�compileZ_first_paramrErBrCr"r$ZunittestrXrrrr�<module>s(S
4

Hacked By AnonymousFox1.0, Coded By AnonymousFox