Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/calltip.cpython-37.opt-2.pyc

B

YI~d��@s�ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	Gdd�d�Z
dd�ZdZd	Z
d
Ze�d�ZdZd
ZdZdd�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�4/opt/alt/python37/lib64/python3.7/idlelib/calltip.py�__init__szCalltip.__init__cCs
d|_dS)N)r	)r
rrr�closesz
Calltip.closecCst�|j�S)N)rZ
CalltipWindowr)r
rrrr szCalltip._make_tk_calltip_windowcCs|jr|j��d|_dS)N)rZhidetip)r
�eventrrr�remove_calltip_window$s
zCalltip.remove_calltip_windowcCs|�d�dS)NT�break)�open_calltip)r
rrrr�force_open_calltip_event)s
z Calltip.force_open_calltip_eventcCs|�d�dS)NF)r)r
rrrr�try_open_calltip_event.szCalltip.try_open_calltip_eventcCs|jr|jjr|�d�dS)NF)rZ	tipwindowr)r
rrrr�refresh_calltip_event5szCalltip.refresh_calltip_eventcCs�|��t|jd�}|�d�}|s&dS|�|d�|��}|sDdS|sZ|�d�dkrZdS|�|�}|sldS|��|_	|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_calltipcCsRy|jjjjj}Wntk
r*d}YnX|rB|�dd|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
	
rcCs4|r0tjtj�}y
t||�Stk
r.dSXdS)N)�sys�modules�__main__�__dict__�eval�
BaseException)r�	namespacerrrr#es
r#�U�z    z(?<=\()\w*\,?\s*zSee source or doczinvalid method signaturez0  # '/' marks preceding args as positional-only.c	
Cs�y
|j}Wntk
rdSXt|tj�r0|n|}ytt�|��}Wn<tk
r�}zt|�}|�	t
�rnt
Sd}Wdd}~XYnXd|kr�t|�ttt
�kr�|t
7}t|t�r�|dkr�t}t|�tkr�tj|ttd�n|r�|gng}t|tj��r�|j}nt|dd�}|�rlxZ|�dt�dt�D]B}|��}|�s:Pt|�tk�r\|dtd�d}|�|��q&Wd�|�}|�p~tS)	N��/z())�subsequent_indent�__doc__�
�z...)�__call__r,�
isinstance�types�
MethodType�str�inspectZ	signature�	Exception�
startswith�_invalid_method�len�	_MAX_COLS�_argument_positional�type�_default_callable_argspec�textwrap�wrap�_INDENTr3�getattr�split�
_MAX_LINES�strip�append�join)	ZobZob_callZfobr�err�msg�lines�doc�linerrrr"{s<


*
r"r))�mainzidlelib.idle_test.test_calltip�)�	verbosity)r)r;�rer'rDr8ZidlelibrZidlelib.hyperparserrrr#r@rIrF�compileZ_first_paramrCr>rAr"r$ZunittestrRrrrr�<module>s(S
6

Hacked By AnonymousFox1.0, Coded By AnonymousFox